@trilogy-ds/react 0.0.21-esm-cjs → 0.0.25-esm-cjs
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/lib/{chunk-EN6H737C.mjs → chunk-2DKS2LMX.mjs} +1 -1
- package/lib/{chunk-WGIO7CR2.mjs → chunk-2OTGQMU4.mjs} +1 -1
- package/lib/{chunk-44BUDUHH.mjs → chunk-2YH3RRRM.mjs} +2 -2
- package/lib/{chunk-ASDIW46N.mjs → chunk-35P2GFHE.mjs} +2 -2
- package/lib/{chunk-MKSHOXCA.mjs → chunk-3K66IDEM.mjs} +1 -1
- package/lib/{chunk-FJ7CLVIP.mjs → chunk-3KNUQLB6.mjs} +2 -2
- package/lib/{chunk-3EEOOLVU.mjs → chunk-3Q36KXPA.mjs} +2 -2
- package/lib/{chunk-WUCECDGY.mjs → chunk-3TQRRK4V.mjs} +1 -1
- package/lib/{chunk-HXGWY5FL.mjs → chunk-4OWEDMLE.mjs} +1 -1
- package/lib/{chunk-TBR32D5M.mjs → chunk-4TJ4WCBN.mjs} +2 -2
- package/lib/{chunk-NMYQHE6C.mjs → chunk-4YVGGJFD.mjs} +3 -3
- package/lib/{chunk-RVU3IPAE.mjs → chunk-52HQIQWC.mjs} +1 -1
- package/lib/{chunk-SOPUKVAK.mjs → chunk-54XVTKOK.mjs} +3 -3
- package/lib/{chunk-WMZ3FFFO.mjs → chunk-55SIPHX3.mjs} +6 -6
- package/lib/{chunk-7GBIPPPJ.mjs → chunk-5CRE5L6X.mjs} +2 -2
- package/lib/{chunk-V4BZDJSQ.mjs → chunk-5D3WYM25.mjs} +2 -2
- package/lib/{chunk-IOGFZUIN.mjs → chunk-5TA2DEFJ.mjs} +2 -2
- package/lib/{chunk-X4ABDBKN.mjs → chunk-5TB5SHQX.mjs} +1 -1
- package/lib/{chunk-QJCK6KDK.mjs → chunk-6AHBDM56.mjs} +3 -7
- package/lib/{chunk-NWKP62JQ.mjs → chunk-6BRKV3OX.mjs} +2 -2
- package/lib/{chunk-BL73QKUI.mjs → chunk-6BSQWFNU.mjs} +2 -2
- package/lib/{chunk-ALGX47MZ.mjs → chunk-6C6TV53V.mjs} +2 -2
- package/lib/{chunk-C3VH34J4.mjs → chunk-6DMIGJGO.mjs} +5 -5
- package/lib/{chunk-QE4JSIR3.mjs → chunk-6FDEOGMS.mjs} +5 -5
- package/lib/{chunk-CWIO3GEP.mjs → chunk-6IKR6FTJ.mjs} +1 -1
- package/lib/{chunk-ZNFQWQ2T.mjs → chunk-6PKFJTR4.mjs} +2 -2
- package/lib/{chunk-G6ILMW5U.mjs → chunk-6SQYOEWM.mjs} +3 -3
- package/lib/{chunk-QOUQNN33.mjs → chunk-6UJQSFOY.mjs} +2 -2
- package/lib/{chunk-S7JT7LRM.mjs → chunk-72F756XM.mjs} +2 -2
- package/lib/{chunk-RHBTSMCQ.mjs → chunk-75VV7W4Z.mjs} +2 -2
- package/lib/{chunk-3VDWD5KA.mjs → chunk-77TXQHWK.mjs} +7 -7
- package/lib/{chunk-2FPIT2VY.mjs → chunk-7MWJMPTG.mjs} +2 -2
- package/lib/{chunk-4FJA5ASG.mjs → chunk-7NY2ELVH.mjs} +2 -2
- package/lib/{chunk-ICF5RIVG.mjs → chunk-7T4UN4NV.mjs} +2 -2
- package/lib/{chunk-LJF3YLMG.mjs → chunk-7Y2HGS2P.mjs} +2 -2
- package/lib/{chunk-SX2VUWRF.mjs → chunk-ACB42JEB.mjs} +2 -2
- package/lib/{chunk-DO5SSRTA.mjs → chunk-ADIMRCHR.mjs} +2 -2
- package/lib/{chunk-5JFVDSGE.mjs → chunk-ADLM6LQF.mjs} +1 -1
- package/lib/{chunk-UFMRE754.mjs → chunk-AEBY6HDR.mjs} +1 -1
- package/lib/{chunk-SESMX6FY.mjs → chunk-AH5YNWHF.mjs} +1 -1
- package/lib/{chunk-XPBBHWYH.mjs → chunk-ANCM66IY.mjs} +1 -1
- package/lib/{chunk-NRNJCOJP.mjs → chunk-ASB33EQZ.mjs} +3 -3
- package/lib/{chunk-Y7WPI233.mjs → chunk-AY5YFUGA.mjs} +2 -2
- package/lib/{chunk-2SSPDMXO.mjs → chunk-AYI37F2L.mjs} +2 -2
- package/lib/{chunk-ZWVIIWK3.mjs → chunk-AZZ5HW4W.mjs} +3 -3
- package/lib/{chunk-HZL4PLNP.mjs → chunk-BAHET6SO.mjs} +2 -2
- package/lib/{chunk-LNFOP27Y.mjs → chunk-BB4CHSZW.mjs} +2 -2
- package/lib/{chunk-RDNWD3P4.mjs → chunk-BKJTZKXR.mjs} +1 -1
- package/lib/{chunk-VLXOCQDY.mjs → chunk-BW6K6RLN.mjs} +4 -4
- package/lib/{chunk-IW7QGP3O.mjs → chunk-C2N7EZSY.mjs} +2 -2
- package/lib/{chunk-ZETHVOMR.mjs → chunk-C755BW7T.mjs} +1 -1
- package/lib/{chunk-3PFN4T6S.mjs → chunk-CABYORPP.mjs} +2 -2
- package/lib/{chunk-76P5II7A.mjs → chunk-CEDDJDON.mjs} +4 -4
- package/lib/{chunk-JPWTOBGP.mjs → chunk-CGAJ7YB2.mjs} +3 -3
- package/lib/{chunk-HWHXZZKH.mjs → chunk-CUPC2XLZ.mjs} +1 -1
- package/lib/{chunk-ZK7CNJ4A.mjs → chunk-CVT3UV6O.mjs} +2 -2
- package/lib/{chunk-QNTBEAY4.mjs → chunk-D7QZPJSF.mjs} +3 -3
- package/lib/{chunk-ASZC2OSU.mjs → chunk-DI7Y6K3W.mjs} +3 -3
- package/lib/{chunk-3CUMNA5T.mjs → chunk-DL6NMHIM.mjs} +6 -6
- package/lib/{chunk-FE4FFIG4.mjs → chunk-DLQQ5RUK.mjs} +2 -2
- package/lib/{chunk-YF74SWNR.mjs → chunk-DMO4FETO.mjs} +4 -4
- package/lib/{chunk-ZX64XZS4.mjs → chunk-DW37QZID.mjs} +2 -2
- package/lib/{chunk-5NAC2FB4.mjs → chunk-E4DP4RHW.mjs} +2 -2
- package/lib/{chunk-HHARJB6A.mjs → chunk-EDBGLR45.mjs} +3 -3
- package/lib/{chunk-O72JHAKF.mjs → chunk-EHWZOM3O.mjs} +2 -2
- package/lib/{chunk-FT2IRACC.mjs → chunk-ERBNAV6P.mjs} +2 -2
- package/lib/{chunk-HVDDVQIJ.mjs → chunk-FA3RCDVF.mjs} +3 -3
- package/lib/{chunk-YRWFLE4T.mjs → chunk-FES7E6XR.mjs} +1 -1
- package/lib/{chunk-ZPYNGMOG.mjs → chunk-FI6OORG5.mjs} +2 -2
- package/lib/{chunk-IRYNHKFI.mjs → chunk-FM5TDIGH.mjs} +1 -1
- package/lib/{chunk-BT63AA2K.mjs → chunk-FVGAKQHS.mjs} +1 -1
- package/lib/{chunk-IOHOQM2G.mjs → chunk-FWRHFQLQ.mjs} +2 -2
- package/lib/{chunk-DVOMGTK6.mjs → chunk-FZ7TRGKO.mjs} +2 -2
- package/lib/{chunk-NEM7FT22.mjs → chunk-G25IZXAD.mjs} +6 -6
- package/lib/{chunk-LBSTQNK7.mjs → chunk-HD7VWQFD.mjs} +2 -2
- package/lib/{chunk-7E4J6YBL.mjs → chunk-HG6NXLAY.mjs} +1 -1
- package/lib/{chunk-ZPE5DDAE.mjs → chunk-HJ3V3LWN.mjs} +2 -2
- package/lib/{chunk-5LNNQJ3B.mjs → chunk-HKJPCWC2.mjs} +2 -2
- package/lib/{chunk-SHMAZXUA.mjs → chunk-HUUIFJSN.mjs} +1 -1
- package/lib/{chunk-3HY3E3O3.mjs → chunk-I5HF26DL.mjs} +5 -5
- package/lib/{chunk-E7H2KJ4A.mjs → chunk-IA3WT3RN.mjs} +1 -1
- package/lib/{chunk-5FBFEA7R.mjs → chunk-INWRBUES.mjs} +1 -1
- package/lib/{chunk-ED5NFRNM.mjs → chunk-IQBE33C7.mjs} +3 -3
- package/lib/{chunk-JWWWYOOC.mjs → chunk-JBRB6UO5.mjs} +1 -1
- package/lib/{chunk-ML52WYPZ.mjs → chunk-JFNPMFSP.mjs} +2 -2
- package/lib/chunk-JJA6BOVR.mjs +12 -0
- package/lib/{chunk-C6AECCOD.mjs → chunk-JLBB25B5.mjs} +1 -1
- package/lib/{chunk-UASF66A2.mjs → chunk-JOU2LHCZ.mjs} +2 -2
- package/lib/{chunk-IJ7BZ3FQ.mjs → chunk-JRFUYD7U.mjs} +2 -2
- package/lib/{chunk-CILK7BCY.mjs → chunk-JYORSGTM.mjs} +2 -2
- package/lib/{chunk-PQMMGS3V.mjs → chunk-K2JIIRTX.mjs} +1 -1
- package/lib/{chunk-J4ZFH6JK.mjs → chunk-KDAZ6BEC.mjs} +6 -6
- package/lib/{chunk-33VW4RVE.mjs → chunk-KPAPQ4IC.mjs} +2 -2
- package/lib/{chunk-I3KHCP2X.mjs → chunk-KTNZEEPJ.mjs} +2 -2
- package/lib/{chunk-IZHMZGGK.mjs → chunk-KYJZK3YJ.mjs} +1 -1
- package/lib/{chunk-P3RZGE6X.mjs → chunk-LFNZETZS.mjs} +3 -3
- package/lib/{chunk-PUBY4YSN.mjs → chunk-LKQDPJV3.mjs} +2 -2
- package/lib/{chunk-GJJJLJXB.mjs → chunk-LPOWVAJK.mjs} +2 -2
- package/lib/{chunk-6RNUF4LV.mjs → chunk-LR6UB33S.mjs} +1 -1
- package/lib/{chunk-OPQY47KX.mjs → chunk-M5IAFQJU.mjs} +1 -1
- package/lib/{chunk-24R7IYOG.mjs → chunk-MAENF3VX.mjs} +4 -4
- package/lib/{chunk-SOW7WGY7.mjs → chunk-MC6ZX32S.mjs} +7 -7
- package/lib/{chunk-WC7HZXMT.mjs → chunk-MEPLLYE4.mjs} +3 -3
- package/lib/{chunk-T4VM27IJ.mjs → chunk-MFQR6S2P.mjs} +1 -1
- package/lib/{chunk-DFR5TVL7.mjs → chunk-MMG2MVYV.mjs} +1 -1
- package/lib/{chunk-6ENX3IQD.mjs → chunk-MR3H2M4V.mjs} +3 -3
- package/lib/{chunk-AMGZXLNR.mjs → chunk-N2ZRITFK.mjs} +3 -3
- package/lib/{chunk-QLJ54D5Q.mjs → chunk-NB23NKHT.mjs} +2 -2
- package/lib/{chunk-WG7MHIX6.mjs → chunk-NOBOKBJV.mjs} +2 -2
- package/lib/{chunk-OUYOYTXI.mjs → chunk-NYLWPJMU.mjs} +2 -2
- package/lib/{chunk-7JMUQSV5.mjs → chunk-NZRHYMSU.mjs} +1 -1
- package/lib/{chunk-JOULFEEZ.mjs → chunk-O26LE2MU.mjs} +2 -2
- package/lib/{chunk-3GLD7T7V.mjs → chunk-O2LVO3J5.mjs} +3 -3
- package/lib/{chunk-7LJJ6SKX.mjs → chunk-O4276YRE.mjs} +3 -3
- package/lib/{chunk-ZSAEN5X7.mjs → chunk-O4JDUDIB.mjs} +3 -3
- package/lib/{chunk-OANYLKIF.mjs → chunk-O4THC3SR.mjs} +1 -1
- package/lib/{chunk-HHE7L3CW.mjs → chunk-OHYZ6AS2.mjs} +2 -2
- package/lib/{chunk-ZG3V7XRP.mjs → chunk-OKRYV2K5.mjs} +1 -1
- package/lib/{chunk-BBXAF6LS.mjs → chunk-ORKJJOJJ.mjs} +3 -3
- package/lib/{chunk-2ZXXN4R4.mjs → chunk-OV5LZHEB.mjs} +2 -2
- package/lib/{chunk-5UAX67EN.mjs → chunk-P25LYDHG.mjs} +3 -3
- package/lib/{chunk-QAXBH7UN.mjs → chunk-PJ76LGUE.mjs} +2 -2
- package/lib/{chunk-44DOSDMV.mjs → chunk-PJKSBYEI.mjs} +1 -1
- package/lib/{chunk-UK4S4W4O.mjs → chunk-PKUBH5X2.mjs} +2 -2
- package/lib/chunk-PMNL6QAW.mjs +75 -0
- package/lib/{chunk-JIGVLQZM.mjs → chunk-PUI5XUNN.mjs} +1 -1
- package/lib/{chunk-VZX5PGQL.mjs → chunk-PZ6AN3SW.mjs} +3 -3
- package/lib/{chunk-4SO7GWOJ.mjs → chunk-Q3CNJCLF.mjs} +3 -3
- package/lib/{chunk-YR5WZRJD.mjs → chunk-QEJFO7PR.mjs} +1 -1
- package/lib/{chunk-SFIOTEMN.mjs → chunk-QLJMWP7T.mjs} +2 -2
- package/lib/{chunk-FRZM4C7T.mjs → chunk-QMVD2AXH.mjs} +2 -2
- package/lib/{chunk-WU5VMIX7.mjs → chunk-QNUD6J4U.mjs} +3 -3
- package/lib/{chunk-COHZA3Q6.mjs → chunk-QSMS7EPD.mjs} +2 -2
- package/lib/{chunk-OSWW7RO6.mjs → chunk-R3PATAKZ.mjs} +8 -8
- package/lib/{chunk-DY3O7TP2.mjs → chunk-R77TROLC.mjs} +1 -1
- package/lib/{chunk-CYSI752N.mjs → chunk-REASBJQM.mjs} +3 -3
- package/lib/{chunk-S76GK7PI.mjs → chunk-RHDHWW2S.mjs} +2 -2
- package/lib/{chunk-Q665G2U7.mjs → chunk-RMYLVQQI.mjs} +4 -4
- package/lib/{chunk-CHKSRCM7.mjs → chunk-RNN54DGP.mjs} +2 -2
- package/lib/{chunk-RXGITNPE.mjs → chunk-ROIMX2WR.mjs} +3 -3
- package/lib/chunk-RTX3I6ZK.mjs +10 -0
- package/lib/{chunk-WRTLMWIM.mjs → chunk-RUOX32PA.mjs} +3 -3
- package/lib/{chunk-DOA3WDEF.mjs → chunk-S7J3C47T.mjs} +1 -1
- package/lib/{chunk-TFDPKEJD.mjs → chunk-S7NWKIXK.mjs} +1 -1
- package/lib/{chunk-XJMDYFHO.mjs → chunk-SIIM6V43.mjs} +6 -6
- package/lib/{chunk-ABTLCSFA.mjs → chunk-SND7OSS4.mjs} +2 -2
- package/lib/{chunk-3APJ5TJP.mjs → chunk-SNMP7GGG.mjs} +2 -2
- package/lib/{chunk-3OWVPQQ3.mjs → chunk-TDU2S3TS.mjs} +3 -3
- package/lib/{chunk-VDIATO4X.mjs → chunk-TOOAKGKJ.mjs} +3 -3
- package/lib/{chunk-X737YRF5.mjs → chunk-TQYLYXDD.mjs} +3 -3
- package/lib/{chunk-M3FKAS2D.mjs → chunk-TT23XPP5.mjs} +2 -2
- package/lib/{chunk-FUOU7EFL.mjs → chunk-TTOOQXA2.mjs} +2 -2
- package/lib/{chunk-2LL5O6MQ.mjs → chunk-TU3M3HXO.mjs} +1 -1
- package/lib/{chunk-P4BQZHBF.mjs → chunk-TVAJEINF.mjs} +1 -1
- package/lib/{chunk-CKEC5R4P.mjs → chunk-U2STNP4N.mjs} +1 -1
- package/lib/{chunk-6QE3IUXA.mjs → chunk-U7ZITDRY.mjs} +2 -2
- package/lib/{chunk-HS3TUYYV.mjs → chunk-UCE7MO2B.mjs} +2 -2
- package/lib/{chunk-UVXTJYNN.mjs → chunk-UGCBEAF4.mjs} +2 -2
- package/lib/{chunk-JT4GOHCW.mjs → chunk-UP6C5CAR.mjs} +2 -2
- package/lib/{chunk-ZUZ6IVLL.mjs → chunk-UXIUWXUF.mjs} +1 -1
- package/lib/{chunk-FJ6D2YGE.mjs → chunk-V5NZV3BW.mjs} +1 -1
- package/lib/{chunk-6BMF3QD3.mjs → chunk-V7KCQBOE.mjs} +2 -2
- package/lib/{chunk-NWBGCS6B.mjs → chunk-VFLDE54S.mjs} +3 -3
- package/lib/{chunk-252FYXMD.mjs → chunk-VN4ZXS27.mjs} +4 -4
- package/lib/{chunk-ZWCLOA5C.mjs → chunk-VRAQPSBJ.mjs} +4 -4
- package/lib/{chunk-HSBIO24M.mjs → chunk-VXPAONOR.mjs} +2 -2
- package/lib/{chunk-DJJVBJ43.mjs → chunk-W4QFWAZK.mjs} +2 -2
- package/lib/{chunk-CUP62RON.mjs → chunk-W4TMRSZ2.mjs} +2 -2
- package/lib/{chunk-QTU7TCVL.mjs → chunk-WCWE6Z45.mjs} +1 -1
- package/lib/{chunk-ELJCCXAM.mjs → chunk-WJPKHTJB.mjs} +2 -2
- package/lib/{chunk-GQID4AGA.mjs → chunk-WO4Y2FRW.mjs} +1 -1
- package/lib/{chunk-AEV6FHUQ.mjs → chunk-WRQHV62E.mjs} +1 -1
- package/lib/{chunk-CDK7APZM.mjs → chunk-WXIW56CT.mjs} +2 -2
- package/lib/{chunk-KJ3L7UBY.mjs → chunk-WZ5KQZFN.mjs} +2 -2
- package/lib/{chunk-WB5FKCPB.mjs → chunk-X6HGH62D.mjs} +7 -7
- package/lib/chunk-XCIDMO7T.mjs +10 -0
- package/lib/{chunk-TRCSKNBB.mjs → chunk-XEHYV47R.mjs} +3 -3
- package/lib/{chunk-MV3N2D6T.mjs → chunk-XEMIHTST.mjs} +2 -2
- package/lib/{chunk-VXILM4QO.mjs → chunk-XFHKH7VN.mjs} +2 -2
- package/lib/{chunk-SQGVYXQT.mjs → chunk-XJETMZE6.mjs} +5 -5
- package/lib/{chunk-ZB4OWTDD.mjs → chunk-XUTWIHGC.mjs} +1 -1
- package/lib/{chunk-JFTUDUYA.mjs → chunk-XZ7VW6AY.mjs} +3 -3
- package/lib/{chunk-SWCJ5OOQ.mjs → chunk-Y4NXOCAQ.mjs} +2 -2
- package/lib/{chunk-3AUAH6SB.mjs → chunk-Y7OXSD5B.mjs} +1 -1
- package/lib/{chunk-KY7T6Q73.mjs → chunk-Y7SHWYB4.mjs} +3 -3
- package/lib/{chunk-BD73QGIH.mjs → chunk-YJUVXFTO.mjs} +2 -2
- package/lib/{chunk-JV5B7QPH.mjs → chunk-YTLLJ6RH.mjs} +11 -11
- package/lib/{chunk-BRU34C4E.mjs → chunk-Z6W7GBCH.mjs} +4 -4
- package/lib/{chunk-2JM27LG6.mjs → chunk-ZETKJIUV.mjs} +1 -1
- package/lib/{chunk-P7P7S4GM.mjs → chunk-ZFISNJY5.mjs} +4 -4
- package/lib/{chunk-O2ACJJBX.mjs → chunk-ZFXTFSU7.mjs} +2 -2
- package/lib/{chunk-EJ56Z27S.mjs → chunk-ZNADK25G.mjs} +8 -8
- package/lib/{chunk-EP73KCU2.mjs → chunk-ZNXJTPMT.mjs} +4 -4
- package/lib/{chunk-QUKKSRQH.mjs → chunk-ZZ6LK25R.mjs} +2 -2
- package/lib/components/accordion/Accordion.js +31 -4
- package/lib/components/accordion/Accordion.mjs +7 -3
- package/lib/components/accordion/index.js +41 -14
- package/lib/components/accordion/index.mjs +12 -8
- package/lib/components/accordion/index.native.js +37 -115
- package/lib/components/accordion/index.native.mjs +6 -6
- package/lib/components/accordion/item/AccordionItem.js +32 -5
- package/lib/components/accordion/item/AccordionItem.mjs +7 -3
- package/lib/components/accordion/item/AccordionItem.native.js +31 -109
- package/lib/components/accordion/item/AccordionItem.native.mjs +4 -4
- package/lib/components/accordion/item/body/AccordionBody.js +31 -4
- package/lib/components/accordion/item/body/AccordionBody.mjs +7 -3
- package/lib/components/accordion/item/body/index.js +31 -4
- package/lib/components/accordion/item/body/index.mjs +7 -3
- package/lib/components/accordion/item/header/AccordionHeader.js +31 -4
- package/lib/components/accordion/item/header/AccordionHeader.mjs +7 -3
- package/lib/components/accordion/item/header/index.js +31 -4
- package/lib/components/accordion/item/header/index.mjs +7 -3
- package/lib/components/accordion/item/index.js +32 -5
- package/lib/components/accordion/item/index.mjs +7 -3
- package/lib/components/accordion/item/index.native.js +31 -109
- package/lib/components/accordion/item/index.native.mjs +4 -4
- package/lib/components/alert/Alert.js +56 -42
- package/lib/components/alert/Alert.mjs +13 -10
- package/lib/components/alert/Alert.native.js +51 -129
- package/lib/components/alert/Alert.native.mjs +27 -27
- package/lib/components/alert/index.js +56 -42
- package/lib/components/alert/index.mjs +13 -10
- package/lib/components/alert/index.native.js +51 -129
- package/lib/components/alert/index.native.mjs +27 -27
- package/lib/components/autocomplete/AutoComplete.js +104 -90
- package/lib/components/autocomplete/AutoComplete.mjs +31 -28
- package/lib/components/autocomplete/AutoComplete.native.js +59 -137
- package/lib/components/autocomplete/AutoComplete.native.mjs +27 -27
- package/lib/components/autocomplete/index.js +104 -90
- package/lib/components/autocomplete/index.mjs +33 -30
- package/lib/components/autocomplete/index.native.js +84 -143
- package/lib/components/autocomplete/index.native.mjs +38 -35
- package/lib/components/autocomplete/item/AutoCompleteIem.native.js +12 -90
- package/lib/components/autocomplete/item/AutoCompleteIem.native.mjs +6 -6
- package/lib/components/autocomplete/item/AutoCompleteItem.js +31 -4
- package/lib/components/autocomplete/item/AutoCompleteItem.mjs +7 -3
- package/lib/components/autocomplete/item/index.js +31 -4
- package/lib/components/autocomplete/item/index.mjs +8 -4
- package/lib/components/autocomplete/item/index.native.js +12 -90
- package/lib/components/autocomplete/item/index.native.mjs +6 -6
- package/lib/components/autocomplete/menu/AutoCompleteMenu.js +30 -3
- package/lib/components/autocomplete/menu/AutoCompleteMenu.mjs +7 -3
- package/lib/components/autocomplete/menu/AutoCompleteMenu.native.js +28 -106
- package/lib/components/autocomplete/menu/AutoCompleteMenu.native.mjs +23 -23
- package/lib/components/autocomplete/menu/index.js +30 -3
- package/lib/components/autocomplete/menu/index.mjs +8 -4
- package/lib/components/autocomplete/menu/index.native.js +28 -106
- package/lib/components/autocomplete/menu/index.native.mjs +23 -23
- package/lib/components/autolayout/AutoLayout/AutoLayout.native.mjs +2 -2
- package/lib/components/autolayout/AutoLayout/index.native.mjs +2 -2
- package/lib/components/autolayout/AutoLayoutWrapper/index.native.mjs +3 -3
- package/lib/components/autolayout/helpers/AutoLayout.helpers.js +38 -11
- package/lib/components/autolayout/helpers/AutoLayout.helpers.mjs +7 -3
- package/lib/components/autolayout/index.mjs +3 -3
- package/lib/components/autolayout/index.native.mjs +3 -3
- package/lib/components/badge/Badge.js +37 -23
- package/lib/components/badge/Badge.mjs +8 -5
- package/lib/components/badge/Badge.native.js +21 -99
- package/lib/components/badge/Badge.native.mjs +21 -21
- package/lib/components/badge/index.js +37 -23
- package/lib/components/badge/index.mjs +8 -5
- package/lib/components/badge/index.native.js +21 -99
- package/lib/components/badge/index.native.mjs +21 -21
- package/lib/components/box/Box.js +30 -16
- package/lib/components/box/Box.mjs +7 -4
- package/lib/components/box/Box.native.js +16 -94
- package/lib/components/box/Box.native.mjs +3 -3
- package/lib/components/box/content/BoxContent.js +32 -18
- package/lib/components/box/content/BoxContent.mjs +7 -4
- package/lib/components/box/content/index.js +32 -18
- package/lib/components/box/content/index.mjs +8 -5
- package/lib/components/box/footer/BoxFooter.js +32 -18
- package/lib/components/box/footer/BoxFooter.mjs +7 -4
- package/lib/components/box/footer/BoxFooter.native.js +18 -96
- package/lib/components/box/footer/BoxFooter.native.mjs +20 -20
- package/lib/components/box/footer/index.js +32 -18
- package/lib/components/box/footer/index.mjs +8 -5
- package/lib/components/box/footer/index.native.js +18 -96
- package/lib/components/box/footer/index.native.mjs +20 -20
- package/lib/components/box/header/BoxHeader.js +32 -18
- package/lib/components/box/header/BoxHeader.mjs +7 -4
- package/lib/components/box/header/BoxHeader.native.js +1 -1
- package/lib/components/box/header/BoxHeader.native.mjs +2 -2
- package/lib/components/box/header/index.js +32 -18
- package/lib/components/box/header/index.mjs +8 -5
- package/lib/components/box/header/index.native.js +1 -1
- package/lib/components/box/header/index.native.mjs +2 -2
- package/lib/components/box/index.js +45 -31
- package/lib/components/box/index.mjs +20 -17
- package/lib/components/box/index.native.js +45 -123
- package/lib/components/box/index.native.mjs +24 -24
- package/lib/components/box/item/BoxItem.js +31 -4
- package/lib/components/box/item/BoxItem.mjs +7 -3
- package/lib/components/box/item/index.js +31 -4
- package/lib/components/box/item/index.mjs +8 -4
- package/lib/components/box/table-container/BoxTableContainer.js +31 -4
- package/lib/components/box/table-container/BoxTableContainer.mjs +7 -3
- package/lib/components/box/table-container/index.js +31 -4
- package/lib/components/box/table-container/index.mjs +8 -4
- package/lib/components/breadcrumb/Breadcrumb.js +32 -5
- package/lib/components/breadcrumb/Breadcrumb.mjs +7 -3
- package/lib/components/breadcrumb/Breadcrumb.native.js +18 -96
- package/lib/components/breadcrumb/Breadcrumb.native.mjs +4 -4
- package/lib/components/breadcrumb/index.js +47 -33
- package/lib/components/breadcrumb/index.mjs +10 -7
- package/lib/components/breadcrumb/index.native.js +26 -104
- package/lib/components/breadcrumb/index.native.mjs +8 -8
- package/lib/components/breadcrumb/item/BreadcrumbItem.js +43 -29
- package/lib/components/breadcrumb/item/BreadcrumbItem.mjs +9 -6
- package/lib/components/breadcrumb/item/BreadcrumbItem.native.js +13 -91
- package/lib/components/breadcrumb/item/BreadcrumbItem.native.mjs +6 -6
- package/lib/components/breadcrumb/item/index.js +43 -29
- package/lib/components/breadcrumb/item/index.mjs +9 -6
- package/lib/components/breadcrumb/item/index.native.js +13 -91
- package/lib/components/breadcrumb/item/index.native.mjs +6 -6
- package/lib/components/button/Button.js +40 -26
- package/lib/components/button/Button.mjs +8 -5
- package/lib/components/button/Button.native.js +33 -111
- package/lib/components/button/Button.native.mjs +22 -22
- package/lib/components/button/index.js +43 -29
- package/lib/components/button/index.mjs +9 -6
- package/lib/components/button/index.native.js +35 -113
- package/lib/components/button/index.native.mjs +22 -22
- package/lib/components/button/list/ButtonList.js +31 -4
- package/lib/components/button/list/ButtonList.mjs +7 -3
- package/lib/components/button/list/index.js +31 -4
- package/lib/components/button/list/index.mjs +7 -3
- package/lib/components/calendar/Calendar.js +173 -159
- package/lib/components/calendar/Calendar.mjs +31 -28
- package/lib/components/calendar/Calendar.native.js +56 -134
- package/lib/components/calendar/Calendar.native.mjs +7 -7
- package/lib/components/calendar/index.js +173 -159
- package/lib/components/calendar/index.mjs +31 -28
- package/lib/components/calendar/index.native.js +56 -134
- package/lib/components/calendar/index.native.mjs +7 -7
- package/lib/components/card/Card.js +33 -6
- package/lib/components/card/Card.mjs +7 -3
- package/lib/components/card/Card.native.js +13 -91
- package/lib/components/card/Card.native.mjs +3 -3
- package/lib/components/card/content/CardContent.js +31 -4
- package/lib/components/card/content/CardContent.mjs +7 -3
- package/lib/components/card/content/CardContent.native.js +16 -94
- package/lib/components/card/content/CardContent.native.mjs +4 -4
- package/lib/components/card/content/index.js +31 -4
- package/lib/components/card/content/index.mjs +8 -4
- package/lib/components/card/content/index.native.js +16 -94
- package/lib/components/card/content/index.native.mjs +4 -4
- package/lib/components/card/image/CardImage.js +32 -5
- package/lib/components/card/image/CardImage.mjs +7 -3
- package/lib/components/card/image/CardImage.native.js +18 -96
- package/lib/components/card/image/CardImage.native.mjs +4 -4
- package/lib/components/card/image/index.js +32 -5
- package/lib/components/card/image/index.mjs +8 -4
- package/lib/components/card/image/index.native.js +18 -96
- package/lib/components/card/image/index.native.mjs +4 -4
- package/lib/components/card/index.js +40 -13
- package/lib/components/card/index.mjs +13 -9
- package/lib/components/card/index.native.js +21 -99
- package/lib/components/card/index.native.mjs +7 -7
- package/lib/components/checkbox/Checkbox.js +35 -8
- package/lib/components/checkbox/Checkbox.mjs +7 -3
- package/lib/components/checkbox/Checkbox.native.js +22 -100
- package/lib/components/checkbox/Checkbox.native.mjs +7 -7
- package/lib/components/checkbox/index.js +63 -49
- package/lib/components/checkbox/index.mjs +30 -27
- package/lib/components/checkbox/index.native.js +47 -125
- package/lib/components/checkbox/index.native.mjs +30 -30
- package/lib/components/checkbox/list/CheckboxList.js +42 -28
- package/lib/components/checkbox/list/CheckboxList.mjs +24 -21
- package/lib/components/checkbox/list/CheckboxList.native.js +11 -89
- package/lib/components/checkbox/list/CheckboxList.native.mjs +10 -10
- package/lib/components/checkbox/list/index.js +42 -28
- package/lib/components/checkbox/list/index.mjs +24 -21
- package/lib/components/checkbox/list/index.native.js +11 -89
- package/lib/components/checkbox/list/index.native.mjs +10 -10
- package/lib/components/checkbox/tiles/CheckboxTiles.js +34 -7
- package/lib/components/checkbox/tiles/CheckboxTiles.mjs +7 -3
- package/lib/components/checkbox/tiles/index.js +34 -7
- package/lib/components/checkbox/tiles/index.mjs +7 -3
- package/lib/components/checkbox/tiles/tile/CheckboxTile.js +44 -30
- package/lib/components/checkbox/tiles/tile/CheckboxTile.mjs +23 -20
- package/lib/components/checkbox/tiles/tile/CheckboxTile.native.js +36 -114
- package/lib/components/checkbox/tiles/tile/CheckboxTile.native.mjs +25 -25
- package/lib/components/checkbox/tiles/tile/index.js +44 -30
- package/lib/components/checkbox/tiles/tile/index.mjs +23 -20
- package/lib/components/checkbox/tiles/tile/index.native.js +36 -114
- package/lib/components/checkbox/tiles/tile/index.native.mjs +25 -25
- package/lib/components/chips/Chips.js +31 -4
- package/lib/components/chips/Chips.mjs +7 -3
- package/lib/components/chips/Chips.native.js +29 -107
- package/lib/components/chips/Chips.native.mjs +8 -8
- package/lib/components/chips/index.js +34 -7
- package/lib/components/chips/index.mjs +8 -4
- package/lib/components/chips/index.native.js +29 -107
- package/lib/components/chips/index.native.mjs +8 -8
- package/lib/components/chips/list/ChipsList.js +31 -4
- package/lib/components/chips/list/ChipsList.mjs +7 -3
- package/lib/components/chips/list/index.js +31 -4
- package/lib/components/chips/list/index.mjs +7 -3
- package/lib/components/columns/Columns.js +31 -4
- package/lib/components/columns/Columns.mjs +8 -4
- package/lib/components/columns/column/Column.js +31 -4
- package/lib/components/columns/column/Column.mjs +7 -3
- package/lib/components/columns/column/Column.native.js +17 -95
- package/lib/components/columns/column/Column.native.mjs +20 -20
- package/lib/components/columns/column/index.js +31 -4
- package/lib/components/columns/column/index.mjs +8 -4
- package/lib/components/columns/column/index.native.js +17 -95
- package/lib/components/columns/column/index.native.mjs +20 -20
- package/lib/components/columns/index.js +34 -7
- package/lib/components/columns/index.mjs +10 -6
- package/lib/components/columns/index.native.js +17 -95
- package/lib/components/columns/index.native.mjs +20 -20
- package/lib/components/container/Container.js +31 -4
- package/lib/components/container/Container.mjs +7 -3
- package/lib/components/container/index.js +31 -4
- package/lib/components/container/index.mjs +7 -3
- package/lib/components/countdown/Countdown.js +36 -9
- package/lib/components/countdown/Countdown.mjs +7 -3
- package/lib/components/countdown/Countdown.native.js +12 -90
- package/lib/components/countdown/Countdown.native.mjs +6 -6
- package/lib/components/countdown/index.js +36 -9
- package/lib/components/countdown/index.mjs +7 -3
- package/lib/components/countdown/index.native.js +12 -90
- package/lib/components/countdown/index.native.mjs +6 -6
- package/lib/components/datepicker/DatePicker.js +259 -245
- package/lib/components/datepicker/DatePicker.mjs +41 -38
- package/lib/components/datepicker/DatePicker.native.js +71 -149
- package/lib/components/datepicker/DatePicker.native.mjs +8 -8
- package/lib/components/datepicker/index.js +259 -245
- package/lib/components/datepicker/index.mjs +41 -38
- package/lib/components/datepicker/index.native.js +71 -149
- package/lib/components/datepicker/index.native.mjs +8 -8
- package/lib/components/divider/Divider.js +35 -21
- package/lib/components/divider/Divider.mjs +8 -5
- package/lib/components/divider/Divider.native.js +26 -104
- package/lib/components/divider/Divider.native.mjs +7 -7
- package/lib/components/divider/index.js +35 -21
- package/lib/components/divider/index.mjs +8 -5
- package/lib/components/divider/index.native.js +26 -104
- package/lib/components/divider/index.native.mjs +7 -7
- package/lib/components/fab/Fab.js +38 -24
- package/lib/components/fab/Fab.mjs +8 -5
- package/lib/components/fab/Fab.native.js +22 -100
- package/lib/components/fab/Fab.native.mjs +22 -22
- package/lib/components/fab/index.js +38 -24
- package/lib/components/fab/index.mjs +8 -5
- package/lib/components/fab/index.native.js +22 -100
- package/lib/components/fab/index.native.mjs +22 -22
- package/lib/components/flex-box/FlexBox.js +31 -4
- package/lib/components/flex-box/FlexBox.mjs +8 -4
- package/lib/components/flex-box/FlexBox.native.js +23 -101
- package/lib/components/flex-box/FlexBox.native.mjs +21 -21
- package/lib/components/flex-box/flex-item/FlexItem.js +31 -4
- package/lib/components/flex-box/flex-item/FlexItem.mjs +7 -3
- package/lib/components/flex-box/index.js +34 -7
- package/lib/components/flex-box/index.mjs +9 -5
- package/lib/components/flex-box/index.native.js +25 -103
- package/lib/components/flex-box/index.native.mjs +21 -21
- package/lib/components/hero/Hero.js +31 -17
- package/lib/components/hero/Hero.mjs +7 -4
- package/lib/components/hero/Hero.native.js +57 -135
- package/lib/components/hero/Hero.native.mjs +23 -23
- package/lib/components/hero/index.js +31 -17
- package/lib/components/hero/index.mjs +7 -4
- package/lib/components/hero/index.native.js +57 -135
- package/lib/components/hero/index.native.mjs +23 -23
- package/lib/components/icon/Icon.js +32 -18
- package/lib/components/icon/Icon.mjs +7 -4
- package/lib/components/icon/Icon.native.js +15 -93
- package/lib/components/icon/Icon.native.mjs +3 -3
- package/lib/components/icon/index.js +32 -18
- package/lib/components/icon/index.mjs +7 -4
- package/lib/components/icon/index.native.js +15 -93
- package/lib/components/icon/index.native.mjs +3 -3
- package/lib/components/image/Image.js +37 -23
- package/lib/components/image/Image.mjs +22 -19
- package/lib/components/image/index.js +37 -23
- package/lib/components/image/index.mjs +22 -19
- package/lib/components/index.js +684 -748
- package/lib/components/index.mjs +220 -217
- package/lib/components/index.native.js +995 -1071
- package/lib/components/index.native.mjs +156 -154
- package/lib/components/input/Input.js +87 -73
- package/lib/components/input/Input.mjs +26 -23
- package/lib/components/input/Input.native.js +47 -125
- package/lib/components/input/Input.native.mjs +24 -24
- package/lib/components/input/gauge/InputGauge.js +57 -43
- package/lib/components/input/gauge/InputGauge.mjs +22 -19
- package/lib/components/input/gauge/InputGauge.native.js +23 -101
- package/lib/components/input/gauge/InputGauge.native.mjs +22 -22
- package/lib/components/input/gauge/hook/useGauge.js +47 -33
- package/lib/components/input/gauge/hook/useGauge.mjs +21 -18
- package/lib/components/input/gauge/hook/useGauge.native.js +15 -93
- package/lib/components/input/gauge/hook/useGauge.native.mjs +20 -20
- package/lib/components/input/index.js +87 -73
- package/lib/components/input/index.mjs +26 -23
- package/lib/components/input/index.native.js +47 -125
- package/lib/components/input/index.native.mjs +24 -24
- package/lib/components/link/Link.js +39 -25
- package/lib/components/link/Link.mjs +8 -5
- package/lib/components/link/Link.native.js +22 -100
- package/lib/components/link/Link.native.mjs +4 -4
- package/lib/components/link/index.js +39 -25
- package/lib/components/link/index.mjs +8 -5
- package/lib/components/link/index.native.js +22 -100
- package/lib/components/link/index.native.mjs +4 -4
- package/lib/components/list/List.js +31 -4
- package/lib/components/list/List.mjs +7 -3
- package/lib/components/list/List.native.mjs +1 -1
- package/lib/components/list/context/index.mjs +1 -1
- package/lib/components/list/index.js +43 -29
- package/lib/components/list/index.mjs +24 -21
- package/lib/components/list/index.native.js +23 -101
- package/lib/components/list/index.native.mjs +24 -24
- package/lib/components/list/item/ListItem.js +37 -23
- package/lib/components/list/item/ListItem.mjs +22 -19
- package/lib/components/list/item/ListItem.native.js +23 -101
- package/lib/components/list/item/ListItem.native.mjs +23 -23
- package/lib/components/list/item/description/ListItemDescription.js +31 -4
- package/lib/components/list/item/description/ListItemDescription.mjs +7 -3
- package/lib/components/list/item/description/ListItemDescription.native.js +32 -110
- package/lib/components/list/item/description/ListItemDescription.native.mjs +23 -23
- package/lib/components/list/item/description/index.js +31 -4
- package/lib/components/list/item/description/index.mjs +7 -3
- package/lib/components/list/item/description/index.native.js +32 -110
- package/lib/components/list/item/description/index.native.mjs +23 -23
- package/lib/components/list/item/index.js +40 -26
- package/lib/components/list/item/index.mjs +23 -20
- package/lib/components/list/item/index.native.js +23 -101
- package/lib/components/list/item/index.native.mjs +24 -24
- package/lib/components/modal/Modal.js +64 -50
- package/lib/components/modal/Modal.mjs +12 -9
- package/lib/components/modal/Modal.native.js +32 -110
- package/lib/components/modal/Modal.native.mjs +22 -22
- package/lib/components/modal/body/ModalBody.js +31 -4
- package/lib/components/modal/body/ModalBody.mjs +7 -3
- package/lib/components/modal/body/ModalBody.native.js +18 -96
- package/lib/components/modal/body/ModalBody.native.mjs +20 -20
- package/lib/components/modal/body/index.native.js +18 -96
- package/lib/components/modal/body/index.native.mjs +20 -20
- package/lib/components/modal/footer/ModalFooter.js +31 -4
- package/lib/components/modal/footer/ModalFooter.mjs +7 -3
- package/lib/components/modal/footer/ModalFooter.native.js +23 -101
- package/lib/components/modal/footer/ModalFooter.native.mjs +22 -22
- package/lib/components/modal/footer/index.native.js +23 -101
- package/lib/components/modal/footer/index.native.mjs +22 -22
- package/lib/components/modal/index.js +70 -56
- package/lib/components/modal/index.mjs +16 -13
- package/lib/components/modal/index.native.js +38 -116
- package/lib/components/modal/index.native.mjs +23 -23
- package/lib/components/otp/Otp.js +43 -29
- package/lib/components/otp/Otp.mjs +9 -6
- package/lib/components/otp/Otp.native.js +30 -108
- package/lib/components/otp/Otp.native.mjs +23 -23
- package/lib/components/otp/index.js +43 -29
- package/lib/components/otp/index.mjs +9 -6
- package/lib/components/otp/index.native.js +30 -108
- package/lib/components/otp/index.native.mjs +23 -23
- package/lib/components/pagination/Pagination.js +44 -30
- package/lib/components/pagination/Pagination.mjs +8 -5
- package/lib/components/pagination/Pagination.native.js +27 -105
- package/lib/components/pagination/Pagination.native.mjs +7 -7
- package/lib/components/pagination/index.js +44 -30
- package/lib/components/pagination/index.mjs +8 -5
- package/lib/components/pagination/index.native.js +27 -105
- package/lib/components/pagination/index.native.mjs +7 -7
- package/lib/components/popover/Popover.js +31 -4
- package/lib/components/popover/Popover.mjs +7 -3
- package/lib/components/popover/Popover.native.js +22 -100
- package/lib/components/popover/Popover.native.mjs +20 -20
- package/lib/components/popover/index.js +31 -4
- package/lib/components/popover/index.mjs +7 -3
- package/lib/components/popover/index.native.js +22 -100
- package/lib/components/popover/index.native.mjs +20 -20
- package/lib/components/price/Price.js +43 -29
- package/lib/components/price/Price.mjs +23 -20
- package/lib/components/price/Price.native.js +22 -100
- package/lib/components/price/Price.native.mjs +21 -21
- package/lib/components/price/index.js +43 -29
- package/lib/components/price/index.mjs +23 -20
- package/lib/components/price/index.native.js +22 -100
- package/lib/components/price/index.native.mjs +21 -21
- package/lib/components/product-tour/ProductTour.js +37 -23
- package/lib/components/product-tour/ProductTour.mjs +8 -5
- package/lib/components/product-tour/index.js +37 -23
- package/lib/components/product-tour/index.mjs +8 -5
- package/lib/components/progress/Progress.js +40 -26
- package/lib/components/progress/Progress.mjs +24 -21
- package/lib/components/progress/Progress.native.js +37 -115
- package/lib/components/progress/Progress.native.mjs +23 -23
- package/lib/components/progress/index.js +57 -43
- package/lib/components/progress/index.mjs +31 -28
- package/lib/components/progress/index.native.js +57 -135
- package/lib/components/progress/index.native.mjs +27 -27
- package/lib/components/progress/item/ProgressItem.js +36 -22
- package/lib/components/progress/item/ProgressItem.mjs +22 -19
- package/lib/components/progress/item/index.js +36 -22
- package/lib/components/progress/item/index.mjs +23 -20
- package/lib/components/progress/radial/ProgressRadial.js +44 -30
- package/lib/components/progress/radial/ProgressRadial.mjs +11 -8
- package/lib/components/progress/radial/ProgressRadial.native.js +38 -116
- package/lib/components/progress/radial/ProgressRadial.native.mjs +22 -22
- package/lib/components/progress/radial/index.js +44 -30
- package/lib/components/progress/radial/index.mjs +12 -9
- package/lib/components/progress/radial/index.native.js +38 -116
- package/lib/components/progress/radial/index.native.mjs +22 -22
- package/lib/components/progress/radial/item/ProgressRadialtem.js +30 -3
- package/lib/components/progress/radial/item/ProgressRadialtem.mjs +7 -3
- package/lib/components/progress/radial/item/index.js +30 -3
- package/lib/components/progress/radial/item/index.mjs +7 -3
- package/lib/components/radio/Radio.js +33 -6
- package/lib/components/radio/Radio.mjs +7 -3
- package/lib/components/radio/Radio.native.js +25 -103
- package/lib/components/radio/Radio.native.mjs +22 -22
- package/lib/components/radio/index.js +58 -44
- package/lib/components/radio/index.mjs +30 -27
- package/lib/components/radio/index.native.js +106 -178
- package/lib/components/radio/index.native.mjs +37 -35
- package/lib/components/radio/list/RadioList.js +42 -28
- package/lib/components/radio/list/RadioList.mjs +24 -21
- package/lib/components/radio/list/RadioList.native.js +39 -25
- package/lib/components/radio/list/RadioList.native.mjs +13 -10
- package/lib/components/radio/list/index.js +42 -28
- package/lib/components/radio/list/index.mjs +24 -21
- package/lib/components/radio/list/index.native.js +39 -25
- package/lib/components/radio/list/index.native.mjs +13 -10
- package/lib/components/radio/tiles/RadioTiles.js +39 -25
- package/lib/components/radio/tiles/RadioTiles.mjs +22 -19
- package/lib/components/radio/tiles/index.js +39 -25
- package/lib/components/radio/tiles/index.mjs +22 -19
- package/lib/components/radio/tiles/tile/RadioTile.js +41 -27
- package/lib/components/radio/tiles/tile/RadioTile.mjs +23 -20
- package/lib/components/radio/tiles/tile/RadioTile.native.js +30 -108
- package/lib/components/radio/tiles/tile/RadioTile.native.mjs +24 -24
- package/lib/components/radio/tiles/tile/index.js +41 -27
- package/lib/components/radio/tiles/tile/index.mjs +23 -20
- package/lib/components/radio/tiles/tile/index.native.js +30 -108
- package/lib/components/radio/tiles/tile/index.native.mjs +24 -24
- package/lib/components/range/Range.js +51 -37
- package/lib/components/range/Range.mjs +22 -19
- package/lib/components/range/Range.native.js +25 -103
- package/lib/components/range/Range.native.mjs +22 -22
- package/lib/components/range/index.js +51 -37
- package/lib/components/range/index.mjs +22 -19
- package/lib/components/range/index.native.js +25 -103
- package/lib/components/range/index.native.mjs +22 -22
- package/lib/components/rows/Rows.js +31 -4
- package/lib/components/rows/Rows.mjs +7 -3
- package/lib/components/rows/index.js +34 -7
- package/lib/components/rows/index.mjs +9 -5
- package/lib/components/rows/row/Row.js +31 -4
- package/lib/components/rows/row/Row.mjs +7 -3
- package/lib/components/rows/row/index.js +31 -4
- package/lib/components/rows/row/index.mjs +8 -4
- package/lib/components/scroll-view/ScrollView.js +36 -22
- package/lib/components/scroll-view/ScrollView.mjs +22 -19
- package/lib/components/scroll-view/ScrollView.native.js +24 -102
- package/lib/components/scroll-view/ScrollView.native.mjs +20 -20
- package/lib/components/scroll-view/index.js +36 -22
- package/lib/components/scroll-view/index.mjs +22 -19
- package/lib/components/scroll-view/index.native.js +24 -102
- package/lib/components/scroll-view/index.native.mjs +20 -20
- package/lib/components/section/Section.js +36 -22
- package/lib/components/section/Section.mjs +22 -19
- package/lib/components/section/Section.native.js +20 -98
- package/lib/components/section/Section.native.mjs +20 -20
- package/lib/components/section/index.js +36 -22
- package/lib/components/section/index.mjs +22 -19
- package/lib/components/section/index.native.js +20 -98
- package/lib/components/section/index.native.mjs +20 -20
- package/lib/components/segment-control/SegmentControl.js +45 -31
- package/lib/components/segment-control/SegmentControl.mjs +24 -21
- package/lib/components/segment-control/SegmentControl.native.js +66 -125
- package/lib/components/segment-control/SegmentControl.native.mjs +30 -27
- package/lib/components/segment-control/index.js +45 -31
- package/lib/components/segment-control/index.mjs +24 -21
- package/lib/components/segment-control/index.native.js +75 -134
- package/lib/components/segment-control/index.native.mjs +30 -27
- package/lib/components/segment-control/item/SegmentControlItem.js +33 -6
- package/lib/components/segment-control/item/SegmentControlItem.mjs +7 -3
- package/lib/components/segment-control/item/index.js +33 -6
- package/lib/components/segment-control/item/index.mjs +8 -4
- package/lib/components/select/Select.js +131 -117
- package/lib/components/select/Select.mjs +30 -27
- package/lib/components/select/Select.native.js +76 -154
- package/lib/components/select/Select.native.mjs +33 -33
- package/lib/components/select/index.js +131 -117
- package/lib/components/select/index.mjs +30 -27
- package/lib/components/select/index.native.js +76 -154
- package/lib/components/select/index.native.mjs +33 -33
- package/lib/components/select/option/SelectOption.js +40 -26
- package/lib/components/select/option/SelectOption.mjs +8 -5
- package/lib/components/select/option/SelectOption.native.js +24 -102
- package/lib/components/select/option/SelectOption.native.mjs +22 -22
- package/lib/components/select/option/index.js +40 -26
- package/lib/components/select/option/index.mjs +9 -6
- package/lib/components/select/option/index.native.js +24 -102
- package/lib/components/select/option/index.native.mjs +23 -23
- package/lib/components/select/web/SelectDynamic.js +105 -91
- package/lib/components/select/web/SelectDynamic.mjs +27 -24
- package/lib/components/select/web/SelectNative.js +133 -119
- package/lib/components/select/web/SelectNative.mjs +30 -27
- package/lib/components/select/web/index.js +133 -119
- package/lib/components/select/web/index.mjs +30 -27
- package/lib/components/skeleton/Skeleton.d.mts +17 -0
- package/lib/components/skeleton/Skeleton.d.ts +17 -0
- package/lib/components/skeleton/Skeleton.js +41 -0
- package/lib/components/skeleton/Skeleton.mjs +8 -0
- package/lib/components/skeleton/Skeleton.native.d.mts +12 -0
- package/lib/components/skeleton/Skeleton.native.d.ts +12 -0
- package/lib/components/skeleton/index.d.mts +1 -1
- package/lib/components/skeleton/index.d.ts +1 -1
- package/lib/components/skeleton/index.js +5 -83
- package/lib/components/skeleton/index.mjs +3 -3
- package/lib/components/skeleton/index.native.d.mts +3 -0
- package/lib/components/skeleton/index.native.d.ts +3 -0
- package/lib/components/skeleton/index.native.js +125 -0
- package/lib/components/skeleton/index.native.mjs +9 -0
- package/lib/components/spacer/Spacer.js +31 -4
- package/lib/components/spacer/Spacer.mjs +7 -3
- package/lib/components/spacer/index.js +31 -4
- package/lib/components/spacer/index.mjs +7 -3
- package/lib/components/stepper/Stepper.js +37 -10
- package/lib/components/stepper/Stepper.mjs +8 -4
- package/lib/components/stepper/Stepper.native.js +22 -100
- package/lib/components/stepper/Stepper.native.mjs +22 -22
- package/lib/components/stepper/index.js +44 -30
- package/lib/components/stepper/index.mjs +11 -8
- package/lib/components/stepper/index.native.js +28 -106
- package/lib/components/stepper/index.native.mjs +22 -22
- package/lib/components/stepper/step/Step.js +35 -21
- package/lib/components/stepper/step/Step.mjs +8 -5
- package/lib/components/stepper/step/Step.native.js +21 -99
- package/lib/components/stepper/step/Step.native.mjs +20 -20
- package/lib/components/stepper/step/index.js +35 -21
- package/lib/components/stepper/step/index.mjs +9 -6
- package/lib/components/stepper/step/index.native.js +21 -99
- package/lib/components/stepper/step/index.native.mjs +20 -20
- package/lib/components/sticker/Sticker.js +36 -22
- package/lib/components/sticker/Sticker.mjs +22 -19
- package/lib/components/sticker/Sticker.native.js +22 -100
- package/lib/components/sticker/Sticker.native.mjs +22 -22
- package/lib/components/sticker/index.js +36 -22
- package/lib/components/sticker/index.mjs +22 -19
- package/lib/components/sticker/index.native.js +22 -100
- package/lib/components/sticker/index.native.mjs +22 -22
- package/lib/components/styleComponent/index.mjs +4 -4
- package/lib/components/switch/Switch.js +42 -28
- package/lib/components/switch/Switch.mjs +22 -19
- package/lib/components/switch/Switch.native.js +18 -96
- package/lib/components/switch/Switch.native.mjs +20 -20
- package/lib/components/switch/index.js +42 -28
- package/lib/components/switch/index.mjs +22 -19
- package/lib/components/switch/index.native.js +18 -96
- package/lib/components/switch/index.native.mjs +20 -20
- package/lib/components/table/Table.js +31 -4
- package/lib/components/table/Table.mjs +7 -3
- package/lib/components/table/Table.native.js +18 -96
- package/lib/components/table/Table.native.mjs +20 -20
- package/lib/components/table/body/TableBody.js +32 -18
- package/lib/components/table/body/TableBody.mjs +7 -4
- package/lib/components/table/body/index.js +32 -18
- package/lib/components/table/body/index.mjs +8 -5
- package/lib/components/table/head/TableHead.js +32 -18
- package/lib/components/table/head/TableHead.mjs +7 -4
- package/lib/components/table/head/index.js +32 -18
- package/lib/components/table/head/index.mjs +8 -5
- package/lib/components/table/index.js +47 -33
- package/lib/components/table/index.mjs +21 -18
- package/lib/components/table/index.native.js +46 -124
- package/lib/components/table/index.native.mjs +29 -29
- package/lib/components/table/td/TableTd.js +31 -4
- package/lib/components/table/td/TableTd.mjs +7 -3
- package/lib/components/table/td/TableTd.native.js +18 -96
- package/lib/components/table/td/TableTd.native.mjs +20 -20
- package/lib/components/table/td/index.js +31 -4
- package/lib/components/table/td/index.mjs +8 -4
- package/lib/components/table/td/index.native.js +18 -96
- package/lib/components/table/td/index.native.mjs +20 -20
- package/lib/components/table/th/TableTh.js +31 -4
- package/lib/components/table/th/TableTh.mjs +7 -3
- package/lib/components/table/th/TableTh.native.js +34 -112
- package/lib/components/table/th/TableTh.native.mjs +23 -23
- package/lib/components/table/th/index.js +31 -4
- package/lib/components/table/th/index.mjs +8 -4
- package/lib/components/table/th/index.native.js +34 -112
- package/lib/components/table/th/index.native.mjs +23 -23
- package/lib/components/table/tr/TableTr.js +32 -18
- package/lib/components/table/tr/TableTr.mjs +7 -4
- package/lib/components/table/tr/TableTr.native.js +32 -110
- package/lib/components/table/tr/TableTr.native.mjs +23 -23
- package/lib/components/table/tr/index.js +32 -18
- package/lib/components/table/tr/index.mjs +8 -5
- package/lib/components/table/tr/index.native.js +32 -110
- package/lib/components/table/tr/index.native.mjs +23 -23
- package/lib/components/tabs/Tabs.js +35 -8
- package/lib/components/tabs/Tabs.mjs +7 -3
- package/lib/components/tabs/index.js +86 -72
- package/lib/components/tabs/index.mjs +20 -17
- package/lib/components/tabs/index.native.js +38 -120
- package/lib/components/tabs/index.native.mjs +23 -23
- package/lib/components/tabs/tab-list/TabList.js +72 -58
- package/lib/components/tabs/tab-list/TabList.mjs +12 -9
- package/lib/components/tabs/tab-list/TabList.native.js +29 -111
- package/lib/components/tabs/tab-list/TabList.native.mjs +23 -23
- package/lib/components/tabs/tab-list/index.js +72 -58
- package/lib/components/tabs/tab-list/index.mjs +12 -9
- package/lib/components/tabs/tab-list/index.native.js +29 -111
- package/lib/components/tabs/tab-list/index.native.mjs +23 -23
- package/lib/components/tabs/tab-list/tab/Tab.js +46 -32
- package/lib/components/tabs/tab-list/tab/Tab.mjs +9 -6
- package/lib/components/tabs/tab-list/tab/Tab.native.js +24 -106
- package/lib/components/tabs/tab-list/tab/Tab.native.mjs +7 -7
- package/lib/components/tabs/tab-list/tab/index.js +46 -32
- package/lib/components/tabs/tab-list/tab/index.mjs +9 -6
- package/lib/components/tabs/tab-list/tab/index.native.js +24 -106
- package/lib/components/tabs/tab-list/tab/index.native.mjs +7 -7
- package/lib/components/tabs/tab-panels/TabPanels.js +37 -10
- package/lib/components/tabs/tab-panels/TabPanels.mjs +9 -5
- package/lib/components/tabs/tab-panels/TabPanels.native.js +18 -96
- package/lib/components/tabs/tab-panels/TabPanels.native.mjs +20 -20
- package/lib/components/tabs/tab-panels/index.js +37 -10
- package/lib/components/tabs/tab-panels/index.mjs +9 -5
- package/lib/components/tabs/tab-panels/index.native.js +18 -96
- package/lib/components/tabs/tab-panels/index.native.mjs +20 -20
- package/lib/components/tabs/tab-panels/tab-panel/TabPanel.js +32 -5
- package/lib/components/tabs/tab-panels/tab-panel/TabPanel.mjs +7 -3
- package/lib/components/tabs/tab-panels/tab-panel/index.js +32 -5
- package/lib/components/tabs/tab-panels/tab-panel/index.mjs +8 -4
- package/lib/components/tag/Tag.js +35 -21
- package/lib/components/tag/Tag.mjs +8 -5
- package/lib/components/tag/Tag.native.js +19 -97
- package/lib/components/tag/Tag.native.mjs +4 -4
- package/lib/components/tag/index.js +39 -25
- package/lib/components/tag/index.mjs +24 -21
- package/lib/components/tag/index.native.js +22 -100
- package/lib/components/tag/index.native.mjs +4 -4
- package/lib/components/tag/list/TagList.js +36 -22
- package/lib/components/tag/list/TagList.mjs +22 -19
- package/lib/components/tag/list/index.js +36 -22
- package/lib/components/tag/list/index.mjs +23 -20
- package/lib/components/text/Text.js +31 -4
- package/lib/components/text/Text.mjs +7 -3
- package/lib/components/text/Text.native.js +9 -87
- package/lib/components/text/Text.native.mjs +5 -5
- package/lib/components/text/index.js +31 -4
- package/lib/components/text/index.mjs +7 -3
- package/lib/components/text/index.native.js +9 -87
- package/lib/components/text/index.native.mjs +5 -5
- package/lib/components/textarea/Textarea.js +42 -28
- package/lib/components/textarea/Textarea.mjs +24 -21
- package/lib/components/textarea/Textarea.native.js +29 -107
- package/lib/components/textarea/Textarea.native.mjs +23 -23
- package/lib/components/textarea/index.js +42 -28
- package/lib/components/textarea/index.mjs +24 -21
- package/lib/components/textarea/index.native.js +29 -107
- package/lib/components/textarea/index.native.mjs +23 -23
- package/lib/components/timeline/Timeline.js +31 -4
- package/lib/components/timeline/Timeline.mjs +7 -3
- package/lib/components/timeline/content/TimelineContent.js +46 -32
- package/lib/components/timeline/content/TimelineContent.mjs +10 -7
- package/lib/components/timeline/content/TimelineContent.native.js +35 -113
- package/lib/components/timeline/content/TimelineContent.native.mjs +27 -27
- package/lib/components/timeline/content/index.js +46 -32
- package/lib/components/timeline/content/index.mjs +11 -8
- package/lib/components/timeline/content/index.native.js +35 -113
- package/lib/components/timeline/content/index.native.mjs +27 -27
- package/lib/components/timeline/index.js +55 -41
- package/lib/components/timeline/index.mjs +20 -17
- package/lib/components/timeline/index.native.js +39 -117
- package/lib/components/timeline/index.native.mjs +29 -29
- package/lib/components/timeline/item/TimelineItem.js +31 -4
- package/lib/components/timeline/item/TimelineItem.mjs +7 -3
- package/lib/components/timeline/item/index.js +31 -4
- package/lib/components/timeline/item/index.mjs +8 -4
- package/lib/components/timeline/marker/TimelineMarker.js +35 -21
- package/lib/components/timeline/marker/TimelineMarker.mjs +8 -5
- package/lib/components/timeline/marker/TimelineMarker.native.js +28 -106
- package/lib/components/timeline/marker/TimelineMarker.native.mjs +21 -21
- package/lib/components/timeline/marker/index.js +35 -21
- package/lib/components/timeline/marker/index.mjs +9 -6
- package/lib/components/timeline/marker/index.native.js +28 -106
- package/lib/components/timeline/marker/index.native.mjs +22 -22
- package/lib/components/title/Title.js +31 -4
- package/lib/components/title/Title.mjs +8 -4
- package/lib/components/title/Title.native.js +20 -98
- package/lib/components/title/Title.native.mjs +21 -21
- package/lib/components/title/index.js +31 -4
- package/lib/components/title/index.mjs +8 -4
- package/lib/components/title/index.native.js +20 -98
- package/lib/components/title/index.native.mjs +21 -21
- package/lib/components/view/View.js +36 -22
- package/lib/components/view/View.mjs +22 -19
- package/lib/components/view/View.native.js +25 -103
- package/lib/components/view/View.native.mjs +21 -21
- package/lib/components/view/index.js +36 -22
- package/lib/components/view/index.mjs +23 -20
- package/lib/components/view/index.native.js +25 -103
- package/lib/components/view/index.native.mjs +21 -21
- package/lib/context/context/index.d.mts +10 -0
- package/lib/context/context/index.d.ts +10 -0
- package/lib/context/context/index.js +54 -0
- package/lib/context/context/index.mjs +10 -0
- package/lib/context/context/index.native.d.mts +2 -0
- package/lib/context/context/index.native.d.ts +2 -0
- package/lib/context/context/index.native.js +38 -0
- package/lib/context/context/index.native.mjs +10 -0
- package/lib/context/index.d.mts +5 -10
- package/lib/context/index.d.ts +5 -10
- package/lib/context/index.js +144 -1
- package/lib/context/index.mjs +20 -1
- package/lib/context/index.native.d.mts +5 -2
- package/lib/context/index.native.d.ts +5 -2
- package/lib/context/index.native.js +90 -1
- package/lib/context/index.native.mjs +25 -1
- package/lib/context/provider/index.js +31 -7
- package/lib/context/provider/index.mjs +5 -4
- package/lib/context/provider/index.native.mjs +3 -5
- package/lib/context/providerStates/index.js +1 -1
- package/lib/context/providerStates/index.mjs +1 -1
- package/lib/context/providerStyled/index.js +38 -14
- package/lib/context/providerStyled/index.mjs +6 -31
- package/lib/context/providerStyled/index.native.mjs +3 -5
- package/lib/context/test/provider.test.js +37 -13
- package/lib/context/test/provider.test.mjs +5 -4
- package/lib/helpers/hashClassesHelpers/index.js +28 -1
- package/lib/helpers/hashClassesHelpers/index.mjs +6 -2
- package/lib/helpers/index.js +28 -1
- package/lib/helpers/index.mjs +6 -2
- package/lib/helpers/index.native.js +28 -1
- package/lib/helpers/index.native.mjs +6 -2
- package/lib/index.js +797 -789
- package/lib/index.mjs +245 -233
- package/lib/index.native.d.mts +1 -2
- package/lib/index.native.d.ts +1 -2
- package/lib/index.native.js +996 -1114
- package/lib/index.native.mjs +173 -177
- package/lib/objects/Typography/index.mjs +3 -3
- package/lib/objects/Typography/index.native.mjs +7 -7
- package/lib/objects/facets/Status/index.js +33 -19
- package/lib/objects/facets/Status/index.mjs +7 -4
- package/lib/objects/facets/Status/index.native.js +15 -93
- package/lib/objects/facets/Status/index.native.mjs +3 -3
- package/lib/objects/facets/index.js +18 -4
- package/lib/objects/facets/index.mjs +27 -24
- package/lib/objects/facets/index.native.js +15 -93
- package/lib/objects/facets/index.native.mjs +23 -23
- package/lib/objects/index.js +20 -6
- package/lib/objects/index.mjs +32 -29
- package/lib/objects/index.native.js +15 -93
- package/lib/objects/index.native.mjs +36 -36
- package/lib/version.d.mts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.mjs +1 -1
- package/package.json +6 -1
- package/lib/chunk-KYCWE6NL.mjs +0 -10
- package/lib/chunk-NYA63FUK.mjs +0 -44
- package/lib/{chunk-4GKCUICZ.mjs → chunk-LEVHVJ5Q.mjs} +3 -3
- package/lib/{chunk-MCQZ43VV.mjs → chunk-M2TC4BZG.mjs} +3 -3
- package/lib/{chunk-6GGZCKVV.mjs → chunk-XKU72OAN.mjs} +3 -3
package/lib/components/index.js
CHANGED
|
@@ -145,7 +145,7 @@ __export(components_exports, {
|
|
|
145
145
|
Select: () => Select_default,
|
|
146
146
|
SelectOption: () => option_default,
|
|
147
147
|
SelectStatus: () => SelectStatus,
|
|
148
|
-
Skeleton: () =>
|
|
148
|
+
Skeleton: () => Skeleton_default,
|
|
149
149
|
Spacer: () => Spacer_default,
|
|
150
150
|
SpacerSize: () => SpacerSize,
|
|
151
151
|
SpacerSizeValues: () => SpacerSizeValues,
|
|
@@ -193,9 +193,9 @@ __export(components_exports, {
|
|
|
193
193
|
module.exports = __toCommonJS(components_exports);
|
|
194
194
|
|
|
195
195
|
// components/accordion/Accordion.tsx
|
|
196
|
-
var
|
|
196
|
+
var React5 = __toESM(require("react"));
|
|
197
197
|
|
|
198
|
-
// context/index.tsx
|
|
198
|
+
// context/context/index.tsx
|
|
199
199
|
var React = __toESM(require("react"));
|
|
200
200
|
var TrilogyContext = React.createContext({
|
|
201
201
|
styled: false,
|
|
@@ -209,6 +209,33 @@ var useTrilogyContext = () => {
|
|
|
209
209
|
return context;
|
|
210
210
|
};
|
|
211
211
|
|
|
212
|
+
// context/provider/index.tsx
|
|
213
|
+
var import_react = __toESM(require("react"));
|
|
214
|
+
|
|
215
|
+
// context/providerStates/index.ts
|
|
216
|
+
var import_react2 = require("react");
|
|
217
|
+
var StatesContext = (0, import_react2.createContext)({
|
|
218
|
+
inverted: false,
|
|
219
|
+
active: false,
|
|
220
|
+
flat: false
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
// context/providerStyled/index.tsx
|
|
224
|
+
var React3 = __toESM(require("react"));
|
|
225
|
+
|
|
226
|
+
// context/providerTheme/index.tsx
|
|
227
|
+
var import_react3 = __toESM(require("react"));
|
|
228
|
+
var defaultTheme = {
|
|
229
|
+
icons: {},
|
|
230
|
+
colors: {},
|
|
231
|
+
fontFamily: {}
|
|
232
|
+
};
|
|
233
|
+
var defaultContextValue = {
|
|
234
|
+
theme: defaultTheme,
|
|
235
|
+
setTheme: () => void 0
|
|
236
|
+
};
|
|
237
|
+
var TrilogyThemeContext = import_react3.default.createContext(defaultContextValue);
|
|
238
|
+
|
|
212
239
|
// helpers/hashClassesHelpers/index.tsx
|
|
213
240
|
var hashClass = (addHash = false, classes) => {
|
|
214
241
|
const { hash, styled } = useTrilogyContext();
|
|
@@ -221,19 +248,19 @@ var hashClass = (addHash = false, classes) => {
|
|
|
221
248
|
|
|
222
249
|
// components/accordion/Accordion.tsx
|
|
223
250
|
var import_clsx = __toESM(require("clsx"));
|
|
224
|
-
var Accordion =
|
|
251
|
+
var Accordion = React5.forwardRef(({ id, className, children, ...others }, ref) => {
|
|
225
252
|
const { styled } = useTrilogyContext();
|
|
226
253
|
const classes = hashClass(styled, (0, import_clsx.default)("accordion", className));
|
|
227
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ React5.createElement("div", { ref, id, className: classes, ...others }, children);
|
|
228
255
|
});
|
|
229
256
|
Accordion.displayName = "Accordion" /* Accordion */;
|
|
230
257
|
var Accordion_default = Accordion;
|
|
231
258
|
|
|
232
259
|
// components/accordion/item/AccordionItem.tsx
|
|
233
260
|
var import_clsx2 = __toESM(require("clsx"));
|
|
234
|
-
var
|
|
235
|
-
var AccordionItem =
|
|
236
|
-
({ open, className, children, id =
|
|
261
|
+
var import_react4 = __toESM(require("react"));
|
|
262
|
+
var AccordionItem = import_react4.default.forwardRef(
|
|
263
|
+
({ open, className, children, id = import_react4.default.useId(), onClick, disabled, ...others }, ref) => {
|
|
237
264
|
const { styled } = useTrilogyContext();
|
|
238
265
|
const classes = hashClass(styled, (0, import_clsx2.default)("accordion-item", className));
|
|
239
266
|
const ariaProps = {};
|
|
@@ -241,7 +268,7 @@ var AccordionItem = import_react.default.forwardRef(
|
|
|
241
268
|
ariaProps["tabIndex"] = -1;
|
|
242
269
|
ariaProps["aria-disabled"] = true;
|
|
243
270
|
}
|
|
244
|
-
return /* @__PURE__ */
|
|
271
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
|
245
272
|
"details",
|
|
246
273
|
{
|
|
247
274
|
open,
|
|
@@ -276,11 +303,11 @@ var AccordionItem_default = AccordionItem;
|
|
|
276
303
|
|
|
277
304
|
// components/accordion/item/body/AccordionBody.tsx
|
|
278
305
|
var import_clsx3 = __toESM(require("clsx"));
|
|
279
|
-
var
|
|
280
|
-
var AccordionBody =
|
|
306
|
+
var React7 = __toESM(require("react"));
|
|
307
|
+
var AccordionBody = React7.forwardRef(
|
|
281
308
|
({ children, className, id, ...others }, ref) => {
|
|
282
309
|
const { styled } = useTrilogyContext();
|
|
283
|
-
return /* @__PURE__ */
|
|
310
|
+
return /* @__PURE__ */ React7.createElement(
|
|
284
311
|
"div",
|
|
285
312
|
{
|
|
286
313
|
ref,
|
|
@@ -300,11 +327,11 @@ var AccordionBody_default = AccordionBody;
|
|
|
300
327
|
|
|
301
328
|
// components/accordion/item/header/AccordionHeader.tsx
|
|
302
329
|
var import_clsx4 = __toESM(require("clsx"));
|
|
303
|
-
var
|
|
304
|
-
var AccordionHeader =
|
|
330
|
+
var React8 = __toESM(require("react"));
|
|
331
|
+
var AccordionHeader = React8.forwardRef(
|
|
305
332
|
({ children, className, id, ...others }, ref) => {
|
|
306
333
|
const { styled } = useTrilogyContext();
|
|
307
|
-
return /* @__PURE__ */
|
|
334
|
+
return /* @__PURE__ */ React8.createElement(
|
|
308
335
|
"summary",
|
|
309
336
|
{
|
|
310
337
|
ref,
|
|
@@ -345,21 +372,8 @@ var values = (obj) => Object.values(obj);
|
|
|
345
372
|
var toArrayObject = () => assign((values(SSRObjectDefined), SSRObjectDefined));
|
|
346
373
|
var SSRObject = toArrayObject();
|
|
347
374
|
|
|
348
|
-
// context/providerTheme/index.tsx
|
|
349
|
-
var import_react2 = __toESM(require("react"));
|
|
350
|
-
var defaultTheme = {
|
|
351
|
-
icons: {},
|
|
352
|
-
colors: {},
|
|
353
|
-
fontFamily: {}
|
|
354
|
-
};
|
|
355
|
-
var defaultContextValue = {
|
|
356
|
-
theme: defaultTheme,
|
|
357
|
-
setTheme: () => void 0
|
|
358
|
-
};
|
|
359
|
-
var TrilogyThemeContext = import_react2.default.createContext(defaultContextValue);
|
|
360
|
-
|
|
361
375
|
// objects/facets/Color/index.tsx
|
|
362
|
-
var
|
|
376
|
+
var import_react5 = require("react");
|
|
363
377
|
var TrilogyColor = /* @__PURE__ */ ((TrilogyColor4) => {
|
|
364
378
|
TrilogyColor4["BACKGROUND"] = "WHITE";
|
|
365
379
|
TrilogyColor4["MAIN"] = "MAIN";
|
|
@@ -435,7 +449,7 @@ var getButtonVariantClassName = (trilogyColor) => {
|
|
|
435
449
|
};
|
|
436
450
|
var getColorStyle = (trilogyColor) => {
|
|
437
451
|
if (typeof navigator !== "undefined" && navigator.userAgent === void 0) {
|
|
438
|
-
const { theme } = (0,
|
|
452
|
+
const { theme } = (0, import_react5.useContext)(TrilogyThemeContext);
|
|
439
453
|
const colorsStyle = (theme == null ? void 0 : theme.colors) || colors;
|
|
440
454
|
const colorArray = colorsStyle[trilogyColor] || colorsStyle.default;
|
|
441
455
|
if (trilogyColor === "transparent") return "transparent";
|
|
@@ -513,8 +527,8 @@ var has = classify("has");
|
|
|
513
527
|
|
|
514
528
|
// components/icon/Icon.tsx
|
|
515
529
|
var import_clsx5 = __toESM(require("clsx"));
|
|
516
|
-
var
|
|
517
|
-
var Icon =
|
|
530
|
+
var React9 = __toESM(require("react"));
|
|
531
|
+
var Icon = React9.forwardRef(
|
|
518
532
|
({ className, id, size: size2, name, circled, stretched, color, backgroundColor, onClick, skeleton, align, ...others }, ref) => {
|
|
519
533
|
const { styled } = useTrilogyContext();
|
|
520
534
|
const background = backgroundColor && has(getBackgroundClassName(backgroundColor)) || circled && has(getBackgroundClassName("MAIN" /* MAIN */)) || "";
|
|
@@ -533,7 +547,7 @@ var Icon = React7.forwardRef(
|
|
|
533
547
|
className
|
|
534
548
|
)
|
|
535
549
|
);
|
|
536
|
-
return /* @__PURE__ */
|
|
550
|
+
return /* @__PURE__ */ React9.createElement("span", { id, onClick: onClick && onClick, className: classes, ...others, ref }, /* @__PURE__ */ React9.createElement("i", { className: hashClass(styled, (0, import_clsx5.default)(name)), "aria-hidden": "true" }));
|
|
537
551
|
}
|
|
538
552
|
);
|
|
539
553
|
Icon.displayName = "Icon" /* Icon */;
|
|
@@ -620,7 +634,7 @@ var IconName = /* @__PURE__ */ ((IconName4) => {
|
|
|
620
634
|
})(IconName || {});
|
|
621
635
|
|
|
622
636
|
// components/text/Text.tsx
|
|
623
|
-
var
|
|
637
|
+
var React10 = __toESM(require("react"));
|
|
624
638
|
var import_clsx6 = __toESM(require("clsx"));
|
|
625
639
|
|
|
626
640
|
// components/text/TextEnum.ts
|
|
@@ -638,7 +652,7 @@ var TextMarkup = /* @__PURE__ */ ((TextMarkup2) => {
|
|
|
638
652
|
})(TextMarkup || {});
|
|
639
653
|
|
|
640
654
|
// components/text/Text.tsx
|
|
641
|
-
var Text =
|
|
655
|
+
var Text = React10.forwardRef(({
|
|
642
656
|
level,
|
|
643
657
|
markup,
|
|
644
658
|
children,
|
|
@@ -686,7 +700,7 @@ var Text = React8.forwardRef(({
|
|
|
686
700
|
if (stringMarkup in TextMarkup || Object.values(TextMarkup).includes(stringMarkup)) return true;
|
|
687
701
|
};
|
|
688
702
|
const Tag2 = markup && isCorrectMarkup2(markup) ? markup : "p";
|
|
689
|
-
return /* @__PURE__ */
|
|
703
|
+
return /* @__PURE__ */ React10.createElement(
|
|
690
704
|
Tag2,
|
|
691
705
|
{
|
|
692
706
|
ref,
|
|
@@ -704,7 +718,7 @@ var Text_default = Text;
|
|
|
704
718
|
|
|
705
719
|
// components/title/Title.tsx
|
|
706
720
|
var import_clsx7 = __toESM(require("clsx"));
|
|
707
|
-
var
|
|
721
|
+
var import_react6 = __toESM(require("react"));
|
|
708
722
|
|
|
709
723
|
// components/title/TitleEnum.ts
|
|
710
724
|
var TitleLevels = /* @__PURE__ */ ((TitleLevels2) => {
|
|
@@ -753,7 +767,7 @@ var getTitleLevel = (level) => {
|
|
|
753
767
|
var isCorrectMarkup = (stringMarkup) => {
|
|
754
768
|
return stringMarkup in TitleMarkup || Object.values(TitleMarkup).includes(stringMarkup);
|
|
755
769
|
};
|
|
756
|
-
var Title =
|
|
770
|
+
var Title = import_react6.default.forwardRef(({
|
|
757
771
|
level = 1 /* ONE */,
|
|
758
772
|
markup,
|
|
759
773
|
children,
|
|
@@ -790,7 +804,7 @@ var Title = import_react4.default.forwardRef(({
|
|
|
790
804
|
if (overline) return overlineClasses;
|
|
791
805
|
return classes;
|
|
792
806
|
};
|
|
793
|
-
return /* @__PURE__ */
|
|
807
|
+
return /* @__PURE__ */ import_react6.default.createElement(Tag2, { ref, id, "aria-label": accessibilityLabel, onClick, className: getClassname(), ...others }, children);
|
|
794
808
|
});
|
|
795
809
|
Title.displayName = "Title" /* Title */;
|
|
796
810
|
var Title_default = Title;
|
|
@@ -834,8 +848,8 @@ var getStatusIconName = (statusType) => {
|
|
|
834
848
|
|
|
835
849
|
// components/alert/Alert.tsx
|
|
836
850
|
var import_clsx8 = __toESM(require("clsx"));
|
|
837
|
-
var
|
|
838
|
-
var
|
|
851
|
+
var React13 = __toESM(require("react"));
|
|
852
|
+
var import_react8 = require("react");
|
|
839
853
|
|
|
840
854
|
// components/alert/AlertProps.ts
|
|
841
855
|
var ToasterAlertPosition = /* @__PURE__ */ ((ToasterAlertPosition2) => {
|
|
@@ -850,9 +864,9 @@ var ToasterAlertFloat = /* @__PURE__ */ ((ToasterAlertFloat2) => {
|
|
|
850
864
|
})(ToasterAlertFloat || {});
|
|
851
865
|
|
|
852
866
|
// components/alert/context/ToasterContext.tsx
|
|
853
|
-
var
|
|
867
|
+
var import_react7 = __toESM(require("react"));
|
|
854
868
|
var emptyFn = () => 0;
|
|
855
|
-
var ToasterContext =
|
|
869
|
+
var ToasterContext = import_react7.default.createContext({ show: emptyFn, hide: emptyFn });
|
|
856
870
|
var ToasterContext_default = ToasterContext;
|
|
857
871
|
|
|
858
872
|
// components/alert/context/index.ts
|
|
@@ -888,7 +902,7 @@ var ToasterAlert = ({
|
|
|
888
902
|
styled,
|
|
889
903
|
(0, import_clsx8.default)("toaster", status && is(getStatusClassName(status)), !status && is("info"), className)
|
|
890
904
|
);
|
|
891
|
-
return title && display !== false ? /* @__PURE__ */
|
|
905
|
+
return title && display !== false ? /* @__PURE__ */ React13.createElement(
|
|
892
906
|
"div",
|
|
893
907
|
{
|
|
894
908
|
id,
|
|
@@ -901,24 +915,24 @@ var ToasterAlert = ({
|
|
|
901
915
|
"data-testid": testId,
|
|
902
916
|
...others
|
|
903
917
|
},
|
|
904
|
-
children ? children : /* @__PURE__ */
|
|
918
|
+
children ? children : /* @__PURE__ */ React13.createElement(React13.Fragment, null, iconName && /* @__PURE__ */ React13.createElement(Icon_default, { name: iconName, size: "small" /* SMALL */ }), /* @__PURE__ */ React13.createElement("div", { className: hashClass(styled, (0, import_clsx8.default)("body")) }, title && /* @__PURE__ */ React13.createElement(Title_default, { markup, level: 6 /* SIX */ }, title), description && /* @__PURE__ */ React13.createElement(Text_default, null, description), toasterChildren && toasterChildren), closable && /* @__PURE__ */ React13.createElement(Icon_default, { onClick: closable, className: "toaster-close", name: "tri-times" /* TIMES */, size: "small" /* SMALL */ }))
|
|
905
919
|
) : null;
|
|
906
920
|
};
|
|
907
|
-
var Alert =
|
|
921
|
+
var Alert = React13.forwardRef(
|
|
908
922
|
({ banner, status, className, id, iconName, title, description, onClick, display = true, markup, ...others }, ref) => {
|
|
909
923
|
const { styled } = useTrilogyContext();
|
|
910
924
|
const classes = hashClass(
|
|
911
925
|
styled,
|
|
912
926
|
(0, import_clsx8.default)("alert", has("body"), status && is(getStatusClassName(status)), banner && is("banner"), className)
|
|
913
927
|
);
|
|
914
|
-
const iconAlert =
|
|
928
|
+
const iconAlert = React13.useMemo(() => {
|
|
915
929
|
var _a;
|
|
916
930
|
if (iconName != null) return iconName;
|
|
917
931
|
else if (status) return (_a = getStatusIconName(status)) != null ? _a : "tri-infos-circle" /* INFOS_CIRCLE */;
|
|
918
932
|
else return "tri-infos-circle" /* INFOS_CIRCLE */;
|
|
919
933
|
}, [iconName, status]);
|
|
920
934
|
if (display) {
|
|
921
|
-
return /* @__PURE__ */
|
|
935
|
+
return /* @__PURE__ */ React13.createElement(
|
|
922
936
|
"div",
|
|
923
937
|
{
|
|
924
938
|
ref,
|
|
@@ -930,18 +944,18 @@ var Alert = React11.forwardRef(
|
|
|
930
944
|
className: classes,
|
|
931
945
|
...others
|
|
932
946
|
},
|
|
933
|
-
/* @__PURE__ */
|
|
934
|
-
/* @__PURE__ */
|
|
947
|
+
/* @__PURE__ */ React13.createElement(Icon_default, { name: iconAlert }),
|
|
948
|
+
/* @__PURE__ */ React13.createElement("div", { className: hashClass(styled, (0, import_clsx8.default)("body")) }, title && typeof title.valueOf() === "string" ? /* @__PURE__ */ React13.createElement(Title_default, { markup, level: 6 /* SIX */ }, title) : title, description && typeof description.valueOf() === "string" ? /* @__PURE__ */ React13.createElement(Text_default, { level: 2 /* TWO */ }, description) : description)
|
|
935
949
|
);
|
|
936
950
|
}
|
|
937
|
-
return /* @__PURE__ */
|
|
951
|
+
return /* @__PURE__ */ React13.createElement("div", null);
|
|
938
952
|
}
|
|
939
953
|
);
|
|
940
954
|
var ToasterAlertProvider = ({ children }) => {
|
|
941
|
-
const [toasterState, setToasterState] = (0,
|
|
942
|
-
const [duration, setDuration] = (0,
|
|
943
|
-
const timeRef = (0,
|
|
944
|
-
const showToast =
|
|
955
|
+
const [toasterState, setToasterState] = (0, import_react8.useState)(null);
|
|
956
|
+
const [duration, setDuration] = (0, import_react8.useState)(5e3);
|
|
957
|
+
const timeRef = (0, import_react8.useRef)(null);
|
|
958
|
+
const showToast = React13.useCallback(
|
|
945
959
|
(params) => {
|
|
946
960
|
var _a;
|
|
947
961
|
setToasterState(params);
|
|
@@ -951,7 +965,7 @@ var ToasterAlertProvider = ({ children }) => {
|
|
|
951
965
|
},
|
|
952
966
|
[timeRef]
|
|
953
967
|
);
|
|
954
|
-
(0,
|
|
968
|
+
(0, import_react8.useEffect)(() => {
|
|
955
969
|
timeRef.current = setTimeout(() => {
|
|
956
970
|
var _a;
|
|
957
971
|
(_a = toasterState == null ? void 0 : toasterState.onHide) == null ? void 0 : _a.call(toasterState);
|
|
@@ -961,7 +975,7 @@ var ToasterAlertProvider = ({ children }) => {
|
|
|
961
975
|
timeRef.current && clearTimeout(timeRef.current);
|
|
962
976
|
};
|
|
963
977
|
}, [toasterState, toasterState == null ? void 0 : toasterState.title]);
|
|
964
|
-
return /* @__PURE__ */
|
|
978
|
+
return /* @__PURE__ */ React13.createElement(context_default.Provider, { value: { show: showToast, hide: () => null } }, children, toasterState && /* @__PURE__ */ React13.createElement(
|
|
965
979
|
ToasterAlert,
|
|
966
980
|
{
|
|
967
981
|
title: toasterState.title,
|
|
@@ -999,7 +1013,7 @@ var AlertMarkup = /* @__PURE__ */ ((AlertMarkup2) => {
|
|
|
999
1013
|
// components/input/Input.tsx
|
|
1000
1014
|
var import_locales = require("@trilogy-ds/locales");
|
|
1001
1015
|
var import_clsx10 = __toESM(require("clsx"));
|
|
1002
|
-
var
|
|
1016
|
+
var import_react12 = __toESM(require("react"));
|
|
1003
1017
|
|
|
1004
1018
|
// objects/facets/Alignable/index.ts
|
|
1005
1019
|
var getAlignClassName = (alignType) => {
|
|
@@ -1066,7 +1080,7 @@ var getVariantClassName = (variantType) => {
|
|
|
1066
1080
|
};
|
|
1067
1081
|
|
|
1068
1082
|
// objects/Typography/TypographyBold/index.tsx
|
|
1069
|
-
var
|
|
1083
|
+
var import_react9 = require("react");
|
|
1070
1084
|
|
|
1071
1085
|
// components/input/InputEnum.ts
|
|
1072
1086
|
var InputType = /* @__PURE__ */ ((InputType2) => {
|
|
@@ -1206,24 +1220,24 @@ var InputKeyboardType = /* @__PURE__ */ ((InputKeyboardType2) => {
|
|
|
1206
1220
|
|
|
1207
1221
|
// components/input/gauge/InputGauge.tsx
|
|
1208
1222
|
var import_clsx9 = __toESM(require("clsx"));
|
|
1209
|
-
var
|
|
1223
|
+
var import_react11 = __toESM(require("react"));
|
|
1210
1224
|
|
|
1211
1225
|
// components/input/gauge/hook/useGauge.tsx
|
|
1212
|
-
var
|
|
1226
|
+
var import_react10 = __toESM(require("react"));
|
|
1213
1227
|
var useGauge = ({ validationRules, inputValue, securityRules }) => {
|
|
1214
1228
|
var _a, _b;
|
|
1215
|
-
const [points, setPoints] =
|
|
1229
|
+
const [points, setPoints] = import_react10.default.useState(0);
|
|
1216
1230
|
const initStateVerifies = { isVerify: false, color: "NEUTRAL" /* NEUTRAL */ };
|
|
1217
|
-
const [isLengthVerify, setIsLengthVerify] =
|
|
1218
|
-
const [isSpecialCharsVerify, setIsSpecialCharsVerify] =
|
|
1219
|
-
const [isNumberVerify, setIsNumberVerify] =
|
|
1220
|
-
const [isUppercaseVerify, setIsUppercaseVerify] =
|
|
1221
|
-
const [isLowerercaseVerify, setisLowerercaseVerify] =
|
|
1222
|
-
const nbAllVerifies =
|
|
1231
|
+
const [isLengthVerify, setIsLengthVerify] = import_react10.default.useState(initStateVerifies);
|
|
1232
|
+
const [isSpecialCharsVerify, setIsSpecialCharsVerify] = import_react10.default.useState(initStateVerifies);
|
|
1233
|
+
const [isNumberVerify, setIsNumberVerify] = import_react10.default.useState(initStateVerifies);
|
|
1234
|
+
const [isUppercaseVerify, setIsUppercaseVerify] = import_react10.default.useState(initStateVerifies);
|
|
1235
|
+
const [isLowerercaseVerify, setisLowerercaseVerify] = import_react10.default.useState(initStateVerifies);
|
|
1236
|
+
const nbAllVerifies = import_react10.default.useMemo(
|
|
1223
1237
|
() => validationRules && Object.values(validationRules).filter((rule) => rule).length || securityRules && securityRules.length || 0,
|
|
1224
1238
|
[validationRules, securityRules]
|
|
1225
1239
|
);
|
|
1226
|
-
const rules =
|
|
1240
|
+
const rules = import_react10.default.useMemo(
|
|
1227
1241
|
() => securityRules && securityRules.map(({ label, patternValidator, dataAttribute }) => ({
|
|
1228
1242
|
label,
|
|
1229
1243
|
validate: !!(patternValidator == null ? void 0 : patternValidator.test(inputValue)),
|
|
@@ -1231,7 +1245,7 @@ var useGauge = ({ validationRules, inputValue, securityRules }) => {
|
|
|
1231
1245
|
})),
|
|
1232
1246
|
[inputValue, securityRules]
|
|
1233
1247
|
);
|
|
1234
|
-
const calcPoints =
|
|
1248
|
+
const calcPoints = import_react10.default.useMemo(() => {
|
|
1235
1249
|
if (validationRules) {
|
|
1236
1250
|
return Number((points / nbAllVerifies * 100).toFixed(0));
|
|
1237
1251
|
}
|
|
@@ -1241,7 +1255,7 @@ var useGauge = ({ validationRules, inputValue, securityRules }) => {
|
|
|
1241
1255
|
}
|
|
1242
1256
|
return 0;
|
|
1243
1257
|
}, [points, nbAllVerifies, rules, validationRules, securityRules]);
|
|
1244
|
-
const widthGauge =
|
|
1258
|
+
const widthGauge = import_react10.default.useMemo(() => {
|
|
1245
1259
|
if (calcPoints <= 50 && calcPoints > 0) return "50%";
|
|
1246
1260
|
if (calcPoints <= 99 && calcPoints > 50) return "75%";
|
|
1247
1261
|
if (calcPoints === 100) return "100%";
|
|
@@ -1253,7 +1267,7 @@ var useGauge = ({ validationRules, inputValue, securityRules }) => {
|
|
|
1253
1267
|
if (calcPoints === 100) return getColorStyle("SUCCESS" /* SUCCESS */);
|
|
1254
1268
|
return getColorStyle("NEUTRAL_FADE" /* NEUTRAL_FADE */);
|
|
1255
1269
|
};
|
|
1256
|
-
const LengthvalidationRulesText = (0,
|
|
1270
|
+
const LengthvalidationRulesText = (0, import_react10.useMemo)(() => {
|
|
1257
1271
|
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1258
1272
|
switch (true) {
|
|
1259
1273
|
case (((_a2 = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _a2.min) !== void 0 && ((_b2 = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _b2.max) !== void 0):
|
|
@@ -1266,7 +1280,7 @@ var useGauge = ({ validationRules, inputValue, securityRules }) => {
|
|
|
1266
1280
|
return "";
|
|
1267
1281
|
}
|
|
1268
1282
|
}, [(_a = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _a.min, (_b = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _b.max]);
|
|
1269
|
-
(0,
|
|
1283
|
+
(0, import_react10.useEffect)(() => {
|
|
1270
1284
|
var _a2, _b2;
|
|
1271
1285
|
const min = ((_a2 = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _a2.min) || 0;
|
|
1272
1286
|
const max = ((_b2 = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _b2.max) || "";
|
|
@@ -1298,7 +1312,7 @@ var useGauge = ({ validationRules, inputValue, securityRules }) => {
|
|
|
1298
1312
|
|
|
1299
1313
|
// components/input/gauge/InputGauge.tsx
|
|
1300
1314
|
var InputGauge = ({ validationRules, styled, inputValue, securityRules }) => {
|
|
1301
|
-
const id = (0,
|
|
1315
|
+
const id = (0, import_react11.useId)();
|
|
1302
1316
|
const {
|
|
1303
1317
|
widthGauge,
|
|
1304
1318
|
colorGauge,
|
|
@@ -1310,14 +1324,14 @@ var InputGauge = ({ validationRules, styled, inputValue, securityRules }) => {
|
|
|
1310
1324
|
isUppercaseVerify,
|
|
1311
1325
|
rules
|
|
1312
1326
|
} = useGauge({ validationRules, inputValue, securityRules });
|
|
1313
|
-
return /* @__PURE__ */
|
|
1327
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", { "data-testid": "security-gauge", className: hashClass(styled, (0, import_clsx9.default)("security-gauge-container")) }, /* @__PURE__ */ import_react11.default.createElement("div", { className: hashClass(styled, (0, import_clsx9.default)("security-gauge")) }, /* @__PURE__ */ import_react11.default.createElement(
|
|
1314
1328
|
"div",
|
|
1315
1329
|
{
|
|
1316
1330
|
"data-gauge": true,
|
|
1317
1331
|
style: { width: widthGauge, backgroundColor: colorGauge() },
|
|
1318
1332
|
className: hashClass(styled, (0, import_clsx9.default)("gauge"))
|
|
1319
1333
|
}
|
|
1320
|
-
)), /* @__PURE__ */
|
|
1334
|
+
)), /* @__PURE__ */ import_react11.default.createElement("div", { className: hashClass(styled, (0, import_clsx9.default)("security-gauge-verifies")) }, validationRules && /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement(
|
|
1321
1335
|
DataVerify,
|
|
1322
1336
|
{
|
|
1323
1337
|
display: !!(validationRules == null ? void 0 : validationRules.length),
|
|
@@ -1328,7 +1342,7 @@ var InputGauge = ({ validationRules, styled, inputValue, securityRules }) => {
|
|
|
1328
1342
|
iconName: isLengthVerify.isVerify ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
1329
1343
|
styled
|
|
1330
1344
|
}
|
|
1331
|
-
), /* @__PURE__ */
|
|
1345
|
+
), /* @__PURE__ */ import_react11.default.createElement(
|
|
1332
1346
|
DataVerify,
|
|
1333
1347
|
{
|
|
1334
1348
|
display: !!(validationRules == null ? void 0 : validationRules.uppercase),
|
|
@@ -1339,7 +1353,7 @@ var InputGauge = ({ validationRules, styled, inputValue, securityRules }) => {
|
|
|
1339
1353
|
iconName: isUppercaseVerify.isVerify ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
1340
1354
|
styled
|
|
1341
1355
|
}
|
|
1342
|
-
), /* @__PURE__ */
|
|
1356
|
+
), /* @__PURE__ */ import_react11.default.createElement(
|
|
1343
1357
|
DataVerify,
|
|
1344
1358
|
{
|
|
1345
1359
|
display: !!(validationRules == null ? void 0 : validationRules.specialChars),
|
|
@@ -1350,7 +1364,7 @@ var InputGauge = ({ validationRules, styled, inputValue, securityRules }) => {
|
|
|
1350
1364
|
iconName: isSpecialCharsVerify.isVerify ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
1351
1365
|
styled
|
|
1352
1366
|
}
|
|
1353
|
-
), /* @__PURE__ */
|
|
1367
|
+
), /* @__PURE__ */ import_react11.default.createElement(
|
|
1354
1368
|
DataVerify,
|
|
1355
1369
|
{
|
|
1356
1370
|
display: !!(validationRules == null ? void 0 : validationRules.lowercase),
|
|
@@ -1361,7 +1375,7 @@ var InputGauge = ({ validationRules, styled, inputValue, securityRules }) => {
|
|
|
1361
1375
|
iconName: isLowerercaseVerify.isVerify ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
1362
1376
|
styled
|
|
1363
1377
|
}
|
|
1364
|
-
), /* @__PURE__ */
|
|
1378
|
+
), /* @__PURE__ */ import_react11.default.createElement(
|
|
1365
1379
|
DataVerify,
|
|
1366
1380
|
{
|
|
1367
1381
|
display: !!(validationRules == null ? void 0 : validationRules.number),
|
|
@@ -1372,7 +1386,7 @@ var InputGauge = ({ validationRules, styled, inputValue, securityRules }) => {
|
|
|
1372
1386
|
iconName: isNumberVerify.isVerify ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
1373
1387
|
styled
|
|
1374
1388
|
}
|
|
1375
|
-
)), securityRules && rules && rules.map((rule) => /* @__PURE__ */
|
|
1389
|
+
)), securityRules && rules && rules.map((rule) => /* @__PURE__ */ import_react11.default.createElement(
|
|
1376
1390
|
DataVerify,
|
|
1377
1391
|
{
|
|
1378
1392
|
key: `${id}_${rule.label}`,
|
|
@@ -1395,18 +1409,18 @@ var DataVerify = ({
|
|
|
1395
1409
|
styled
|
|
1396
1410
|
}) => {
|
|
1397
1411
|
if (!display) return null;
|
|
1398
|
-
return /* @__PURE__ */
|
|
1412
|
+
return /* @__PURE__ */ import_react11.default.createElement("div", { ...dataAttribute, className: hashClass(styled, (0, import_clsx9.default)("security", classes)) }, /* @__PURE__ */ import_react11.default.createElement(Icon_default, { color, name: iconName, size: "smaller" /* SMALLER */ }), /* @__PURE__ */ import_react11.default.createElement("span", null, type));
|
|
1399
1413
|
};
|
|
1400
1414
|
var InputGauge_default = InputGauge;
|
|
1401
1415
|
|
|
1402
1416
|
// components/input/Input.tsx
|
|
1403
|
-
var Input =
|
|
1417
|
+
var Input = import_react12.default.forwardRef(
|
|
1404
1418
|
({
|
|
1405
1419
|
forceControl,
|
|
1406
1420
|
label,
|
|
1407
1421
|
sample,
|
|
1408
1422
|
className,
|
|
1409
|
-
id =
|
|
1423
|
+
id = import_react12.default.useId(),
|
|
1410
1424
|
disabled,
|
|
1411
1425
|
onChange,
|
|
1412
1426
|
onKeyPress,
|
|
@@ -1445,19 +1459,19 @@ var Input = import_react10.default.forwardRef(
|
|
|
1445
1459
|
...others
|
|
1446
1460
|
}, ref) => {
|
|
1447
1461
|
const { styled } = useTrilogyContext();
|
|
1448
|
-
const idHelp = (0,
|
|
1449
|
-
const idSample = (0,
|
|
1462
|
+
const idHelp = (0, import_react12.useId)();
|
|
1463
|
+
const idSample = (0, import_react12.useId)();
|
|
1450
1464
|
const inputIcon = /* @__PURE__ */ new Map();
|
|
1451
1465
|
inputIcon.set("success" /* SUCCESS */, "tri-check-circle" /* CHECK_CIRCLE */);
|
|
1452
1466
|
inputIcon.set("warning" /* WARNING */, "tri-exclamation-circle" /* EXCLAMATION_CIRCLE */);
|
|
1453
1467
|
inputIcon.set("error" /* ERROR */, "tri-exclamation-circle" /* EXCLAMATION_CIRCLE */);
|
|
1454
|
-
const [_value, setValue] = (0,
|
|
1455
|
-
const [isFocused, setIsFocused] = (0,
|
|
1456
|
-
const [isDirty, setIsDirty] = (0,
|
|
1457
|
-
const [isTouched, setIsTouched] = (0,
|
|
1458
|
-
const [localStatus, setLocalStatus] = (0,
|
|
1459
|
-
const [inputType, setInputType] = (0,
|
|
1460
|
-
const [isShowPwd, setIsShowPwd] = (0,
|
|
1468
|
+
const [_value, setValue] = (0, import_react12.useState)(defaultValue != null ? defaultValue : "");
|
|
1469
|
+
const [isFocused, setIsFocused] = (0, import_react12.useState)(focused != null ? focused : false);
|
|
1470
|
+
const [isDirty, setIsDirty] = (0, import_react12.useState)(false);
|
|
1471
|
+
const [isTouched, setIsTouched] = (0, import_react12.useState)(false);
|
|
1472
|
+
const [localStatus, setLocalStatus] = (0, import_react12.useState)(status || "default" /* DEFAULT */);
|
|
1473
|
+
const [inputType, setInputType] = (0, import_react12.useState)(type);
|
|
1474
|
+
const [isShowPwd, setIsShowPwd] = (0, import_react12.useState)(false);
|
|
1461
1475
|
const helpClasses = (0, import_clsx10.default)("help", localStatus && is(localStatus));
|
|
1462
1476
|
const loader = hashClass(styled, (0, import_clsx10.default)(is("searching")));
|
|
1463
1477
|
const inputLabelClasses = hashClass(styled, "input-label");
|
|
@@ -1476,7 +1490,7 @@ var Input = import_react10.default.forwardRef(
|
|
|
1476
1490
|
[has("icons-left")]: iconNameLeft || type === "search" /* SEARCH */
|
|
1477
1491
|
})
|
|
1478
1492
|
);
|
|
1479
|
-
const onPressKey = (0,
|
|
1493
|
+
const onPressKey = (0, import_react12.useCallback)((e) => {
|
|
1480
1494
|
const target = e.target;
|
|
1481
1495
|
return {
|
|
1482
1496
|
inputName: target.name,
|
|
@@ -1487,10 +1501,10 @@ var Input = import_react10.default.forwardRef(
|
|
|
1487
1501
|
preventDefault: () => e.preventDefault()
|
|
1488
1502
|
};
|
|
1489
1503
|
}, []);
|
|
1490
|
-
const IconWrapper = (0,
|
|
1504
|
+
const IconWrapper = (0, import_react12.useCallback)(
|
|
1491
1505
|
({ className: className2, name: name2, color, closeIconSearch, onPress, srOnly, showPassword }) => {
|
|
1492
1506
|
const Markup = showPassword ? "button" : "div";
|
|
1493
|
-
return /* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
1494
1508
|
Markup,
|
|
1495
1509
|
{
|
|
1496
1510
|
...showPassword && { "data-show-pwd": true, type: "button" },
|
|
@@ -1501,8 +1515,8 @@ var Input = import_react10.default.forwardRef(
|
|
|
1501
1515
|
}
|
|
1502
1516
|
}
|
|
1503
1517
|
},
|
|
1504
|
-
/* @__PURE__ */
|
|
1505
|
-
_value && _value.length > 0 && closeIconSearch && /* @__PURE__ */
|
|
1518
|
+
/* @__PURE__ */ import_react12.default.createElement(Icon_default, { className: className2, name: name2, size: "small" /* SMALL */, color }),
|
|
1519
|
+
_value && _value.length > 0 && closeIconSearch && /* @__PURE__ */ import_react12.default.createElement(
|
|
1506
1520
|
Icon_default,
|
|
1507
1521
|
{
|
|
1508
1522
|
onClick: () => setValue(""),
|
|
@@ -1511,34 +1525,34 @@ var Input = import_react10.default.forwardRef(
|
|
|
1511
1525
|
size: "small" /* SMALL */
|
|
1512
1526
|
}
|
|
1513
1527
|
),
|
|
1514
|
-
showPassword && srOnly && /* @__PURE__ */
|
|
1528
|
+
showPassword && srOnly && /* @__PURE__ */ import_react12.default.createElement("span", { className: srOnlyClasses }, srOnly)
|
|
1515
1529
|
);
|
|
1516
1530
|
},
|
|
1517
1531
|
[_value, styled]
|
|
1518
1532
|
);
|
|
1519
1533
|
const validator = !customValidator && patternValidator ? (value2) => patternValidator.test(value2) ? "success" /* SUCCESS */ : "error" /* ERROR */ : customValidator;
|
|
1520
|
-
(0,
|
|
1534
|
+
(0, import_react12.useEffect)(() => {
|
|
1521
1535
|
var _a;
|
|
1522
1536
|
setValue((_a = value != null ? value : defaultValue) != null ? _a : "");
|
|
1523
1537
|
}, [value, defaultValue]);
|
|
1524
|
-
(0,
|
|
1538
|
+
(0, import_react12.useEffect)(() => {
|
|
1525
1539
|
setIsFocused(focused != null ? focused : false);
|
|
1526
1540
|
}, [focused]);
|
|
1527
|
-
(0,
|
|
1541
|
+
(0, import_react12.useEffect)(() => {
|
|
1528
1542
|
if (isFocused) setIsDirty(true);
|
|
1529
1543
|
else if (isDirty) setIsTouched(true);
|
|
1530
1544
|
}, [isFocused, isDirty]);
|
|
1531
|
-
(0,
|
|
1545
|
+
(0, import_react12.useEffect)(() => {
|
|
1532
1546
|
if (!validator || !isTouched) return;
|
|
1533
1547
|
setLocalStatus(validator(_value));
|
|
1534
1548
|
}, [isFocused, isTouched]);
|
|
1535
|
-
(0,
|
|
1549
|
+
(0, import_react12.useEffect)(() => {
|
|
1536
1550
|
setLocalStatus(status || "default" /* DEFAULT */);
|
|
1537
1551
|
}, [status]);
|
|
1538
|
-
(0,
|
|
1552
|
+
(0, import_react12.useEffect)(() => {
|
|
1539
1553
|
if (onStatusChange) onStatusChange(localStatus);
|
|
1540
1554
|
}, [localStatus]);
|
|
1541
|
-
return /* @__PURE__ */
|
|
1555
|
+
return /* @__PURE__ */ import_react12.default.createElement("div", { className: wrapperClasses, "data-has-gauge": securityGauge ? true : void 0 }, label && /* @__PURE__ */ import_react12.default.createElement("label", { className: inputLabelClasses, htmlFor: id }, label, " ", required && /* @__PURE__ */ import_react12.default.createElement(Text_default, { markup: "span" /* SPAN */, typo: "has-text-error" /* TEXT_ERROR */ }, "*")), sample && /* @__PURE__ */ import_react12.default.createElement(Text_default, { className: "input-sample", level: 2 /* TWO */, id: idSample }, sample), /* @__PURE__ */ import_react12.default.createElement("div", { className: controlClasses }, /* @__PURE__ */ import_react12.default.createElement(
|
|
1542
1556
|
"input",
|
|
1543
1557
|
{
|
|
1544
1558
|
"aria-describedby": `${idHelp} ${idSample}`,
|
|
@@ -1603,7 +1617,7 @@ var Input = import_react10.default.forwardRef(
|
|
|
1603
1617
|
setIsFocused(false);
|
|
1604
1618
|
}
|
|
1605
1619
|
}
|
|
1606
|
-
), hasIcon && !localStatus && !loading && iconNameLeft && /* @__PURE__ */
|
|
1620
|
+
), hasIcon && !localStatus && !loading && iconNameLeft && /* @__PURE__ */ import_react12.default.createElement(IconWrapper, { name: iconNameLeft }), (iconNameLeft || type === "search" /* SEARCH */) && /* @__PURE__ */ import_react12.default.createElement(IconWrapper, { className: "icon-left", name: iconNameLeft || "tri-search" /* SEARCH */ }), iconNameRight && !loading && type !== "password" /* PASSWORD */ && /* @__PURE__ */ import_react12.default.createElement(IconWrapper, { className: "icon-right", name: iconNameRight }), !loading && type === "password" /* PASSWORD */ && /* @__PURE__ */ import_react12.default.createElement(
|
|
1607
1621
|
IconWrapper,
|
|
1608
1622
|
{
|
|
1609
1623
|
showPassword: true,
|
|
@@ -1620,7 +1634,7 @@ var Input = import_react10.default.forwardRef(
|
|
|
1620
1634
|
}
|
|
1621
1635
|
}
|
|
1622
1636
|
}
|
|
1623
|
-
), loading && /* @__PURE__ */
|
|
1637
|
+
), loading && /* @__PURE__ */ import_react12.default.createElement("span", { className: loader })), help && /* @__PURE__ */ import_react12.default.createElement(Text_default, { className: helpClasses, id: idHelp }, help), securityGauge && type === "password" /* PASSWORD */ && /* @__PURE__ */ import_react12.default.createElement(
|
|
1624
1638
|
InputGauge_default,
|
|
1625
1639
|
{
|
|
1626
1640
|
validationRules,
|
|
@@ -1636,7 +1650,7 @@ var Input_default = Input;
|
|
|
1636
1650
|
|
|
1637
1651
|
// components/autocomplete/AutoComplete.tsx
|
|
1638
1652
|
var import_clsx13 = __toESM(require("clsx"));
|
|
1639
|
-
var
|
|
1653
|
+
var import_react13 = __toESM(require("react"));
|
|
1640
1654
|
|
|
1641
1655
|
// components/autocomplete/Autocomplete.helpers.ts
|
|
1642
1656
|
var getLabel = (data) => typeof data === "string" ? data : data["label"];
|
|
@@ -1654,7 +1668,7 @@ var defaultMatching = (data, value) => {
|
|
|
1654
1668
|
|
|
1655
1669
|
// components/autocomplete/item/AutoCompleteItem.tsx
|
|
1656
1670
|
var import_clsx11 = __toESM(require("clsx"));
|
|
1657
|
-
var
|
|
1671
|
+
var React17 = __toESM(require("react"));
|
|
1658
1672
|
var AutoCompleteItem = ({
|
|
1659
1673
|
children,
|
|
1660
1674
|
suggestionSelected,
|
|
@@ -1664,8 +1678,8 @@ var AutoCompleteItem = ({
|
|
|
1664
1678
|
id
|
|
1665
1679
|
}) => {
|
|
1666
1680
|
const { styled } = useTrilogyContext();
|
|
1667
|
-
const [isActive, setIsActive] =
|
|
1668
|
-
return /* @__PURE__ */
|
|
1681
|
+
const [isActive, setIsActive] = React17.useState(false);
|
|
1682
|
+
return /* @__PURE__ */ React17.createElement(
|
|
1669
1683
|
"div",
|
|
1670
1684
|
{
|
|
1671
1685
|
id,
|
|
@@ -1686,10 +1700,10 @@ var item_default = AutoCompleteItem_default;
|
|
|
1686
1700
|
|
|
1687
1701
|
// components/autocomplete/menu/AutoCompleteMenu.tsx
|
|
1688
1702
|
var import_clsx12 = __toESM(require("clsx"));
|
|
1689
|
-
var
|
|
1703
|
+
var React18 = __toESM(require("react"));
|
|
1690
1704
|
var AutoCompleteMenu = ({ children, className, id, absolute, fullwidth, testId }) => {
|
|
1691
1705
|
const { styled } = useTrilogyContext();
|
|
1692
|
-
return /* @__PURE__ */
|
|
1706
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1693
1707
|
"div",
|
|
1694
1708
|
{
|
|
1695
1709
|
id,
|
|
@@ -1754,17 +1768,17 @@ var AutoCompleteRef = ({
|
|
|
1754
1768
|
...others
|
|
1755
1769
|
}, ref) => {
|
|
1756
1770
|
const { styled } = useTrilogyContext();
|
|
1757
|
-
const [itemSelected, setItemSelected] = (0,
|
|
1758
|
-
const [_inputValue, setInputValue] = (0,
|
|
1759
|
-
const [activeItem, setActiveItem] = (0,
|
|
1760
|
-
const [isAutocompleteMenuVisible, setIsAutocompleteMenuVisible] = (0,
|
|
1761
|
-
const [search, setSearch] = (0,
|
|
1771
|
+
const [itemSelected, setItemSelected] = (0, import_react13.useState)(null);
|
|
1772
|
+
const [_inputValue, setInputValue] = (0, import_react13.useState)(value != null ? value : "");
|
|
1773
|
+
const [activeItem, setActiveItem] = (0, import_react13.useState)(0);
|
|
1774
|
+
const [isAutocompleteMenuVisible, setIsAutocompleteMenuVisible] = (0, import_react13.useState)(displayMenu || false);
|
|
1775
|
+
const [search, setSearch] = (0, import_react13.useState)([]);
|
|
1762
1776
|
const autocompleteClasses = hashClass(styled, (0, import_clsx13.default)(is("autocomplete"), is("active")));
|
|
1763
1777
|
const autocompleteContainerClasses = hashClass(styled, (0, import_clsx13.default)(is("autocomplete-container")));
|
|
1764
|
-
(0,
|
|
1778
|
+
(0, import_react13.useEffect)(() => {
|
|
1765
1779
|
setInputValue(value || "");
|
|
1766
1780
|
}, [value]);
|
|
1767
|
-
(0,
|
|
1781
|
+
(0, import_react13.useEffect)(() => {
|
|
1768
1782
|
setActiveItem(0);
|
|
1769
1783
|
if (data == null ? void 0 : data.length) {
|
|
1770
1784
|
if (matching) {
|
|
@@ -1775,7 +1789,7 @@ var AutoCompleteRef = ({
|
|
|
1775
1789
|
setItemSelected(null);
|
|
1776
1790
|
}
|
|
1777
1791
|
}, [_inputValue]);
|
|
1778
|
-
(0,
|
|
1792
|
+
(0, import_react13.useEffect)(() => {
|
|
1779
1793
|
setSearch(matching(data, _inputValue));
|
|
1780
1794
|
}, [data]);
|
|
1781
1795
|
const onTextChanged = async (e) => {
|
|
@@ -1842,7 +1856,7 @@ var AutoCompleteRef = ({
|
|
|
1842
1856
|
setIsAutocompleteMenuVisible(true);
|
|
1843
1857
|
if (onFocus) onFocus(event);
|
|
1844
1858
|
};
|
|
1845
|
-
return /* @__PURE__ */
|
|
1859
|
+
return /* @__PURE__ */ import_react13.default.createElement("div", { className: autocompleteContainerClasses }, /* @__PURE__ */ import_react13.default.createElement(
|
|
1846
1860
|
Input_default,
|
|
1847
1861
|
{
|
|
1848
1862
|
id,
|
|
@@ -1871,7 +1885,7 @@ var AutoCompleteRef = ({
|
|
|
1871
1885
|
loading,
|
|
1872
1886
|
...{ onKeyDown: (e) => e.key === "Enter" && e.preventDefault(), ...others }
|
|
1873
1887
|
}
|
|
1874
|
-
), isAutocompleteMenuVisible && /* @__PURE__ */
|
|
1888
|
+
), isAutocompleteMenuVisible && /* @__PURE__ */ import_react13.default.createElement("div", { className: autocompleteClasses }, search.length > 0 && /* @__PURE__ */ import_react13.default.createElement(menu_default, { absolute: absoluteMenu, fullwidth: fullwidthMenu, className: classNameMenu }, search.map((item, i) => /* @__PURE__ */ import_react13.default.createElement(
|
|
1875
1889
|
item_default,
|
|
1876
1890
|
{
|
|
1877
1891
|
active: activeItem === i,
|
|
@@ -1883,25 +1897,25 @@ var AutoCompleteRef = ({
|
|
|
1883
1897
|
)))));
|
|
1884
1898
|
};
|
|
1885
1899
|
AutoCompleteRef.displayName = "AutoComplete" /* AutoComplete */;
|
|
1886
|
-
var AutoComplete =
|
|
1900
|
+
var AutoComplete = import_react13.default.forwardRef(AutoCompleteRef);
|
|
1887
1901
|
var AutoComplete_default = AutoComplete;
|
|
1888
1902
|
|
|
1889
1903
|
// components/autolayout/AutoLayout/AutoLayout.tsx
|
|
1890
|
-
var
|
|
1904
|
+
var React20 = __toESM(require("react"));
|
|
1891
1905
|
var AutoLayout = ({ children }) => {
|
|
1892
|
-
return /* @__PURE__ */
|
|
1906
|
+
return /* @__PURE__ */ React20.createElement("div", { className: "autolayout" }, children);
|
|
1893
1907
|
};
|
|
1894
1908
|
var AutoLayout_default = AutoLayout;
|
|
1895
1909
|
|
|
1896
1910
|
// components/autolayout/AutoLayoutWrapper/index.tsx
|
|
1897
|
-
var
|
|
1911
|
+
var React21 = __toESM(require("react"));
|
|
1898
1912
|
var AutoLayoutWrapper = ({ autolayout = true, children }) => {
|
|
1899
1913
|
if (autolayout === true) {
|
|
1900
|
-
return /* @__PURE__ */
|
|
1914
|
+
return /* @__PURE__ */ React21.createElement(AutoLayout_default, null, children);
|
|
1901
1915
|
} else if (autolayout) {
|
|
1902
|
-
return /* @__PURE__ */
|
|
1916
|
+
return /* @__PURE__ */ React21.createElement(AutoLayout_default, { matrix: autolayout }, children);
|
|
1903
1917
|
} else {
|
|
1904
|
-
return /* @__PURE__ */
|
|
1918
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, children);
|
|
1905
1919
|
}
|
|
1906
1920
|
};
|
|
1907
1921
|
var AutoLayoutWrapper_default = AutoLayoutWrapper;
|
|
@@ -1969,8 +1983,8 @@ var DEFAULT_SPACING_MATRIX = [
|
|
|
1969
1983
|
|
|
1970
1984
|
// components/badge/Badge.tsx
|
|
1971
1985
|
var import_clsx14 = __toESM(require("clsx"));
|
|
1972
|
-
var
|
|
1973
|
-
var Badge =
|
|
1986
|
+
var React22 = __toESM(require("react"));
|
|
1987
|
+
var Badge = React22.forwardRef(
|
|
1974
1988
|
({ className, children, id, label, inverted, onClick, variant, position, status, ...others }, ref) => {
|
|
1975
1989
|
const { styled } = useTrilogyContext();
|
|
1976
1990
|
const classes = hashClass(
|
|
@@ -2005,7 +2019,7 @@ var Badge = React20.forwardRef(
|
|
|
2005
2019
|
default:
|
|
2006
2020
|
break;
|
|
2007
2021
|
}
|
|
2008
|
-
const simpleBadge = status && iconName && iconColor ? /* @__PURE__ */
|
|
2022
|
+
const simpleBadge = status && iconName && iconColor ? /* @__PURE__ */ React22.createElement(
|
|
2009
2023
|
Icon_default,
|
|
2010
2024
|
{
|
|
2011
2025
|
ref,
|
|
@@ -2017,7 +2031,7 @@ var Badge = React20.forwardRef(
|
|
|
2017
2031
|
id,
|
|
2018
2032
|
...others
|
|
2019
2033
|
}
|
|
2020
|
-
) : /* @__PURE__ */
|
|
2034
|
+
) : /* @__PURE__ */ React22.createElement(
|
|
2021
2035
|
"span",
|
|
2022
2036
|
{
|
|
2023
2037
|
ref,
|
|
@@ -2032,7 +2046,7 @@ var Badge = React20.forwardRef(
|
|
|
2032
2046
|
label
|
|
2033
2047
|
);
|
|
2034
2048
|
if (children) {
|
|
2035
|
-
return /* @__PURE__ */
|
|
2049
|
+
return /* @__PURE__ */ React22.createElement("span", { className: "badge-container" }, children, simpleBadge);
|
|
2036
2050
|
}
|
|
2037
2051
|
return simpleBadge;
|
|
2038
2052
|
}
|
|
@@ -2062,8 +2076,8 @@ var BadgeVariant = /* @__PURE__ */ ((BadgeVariant2) => {
|
|
|
2062
2076
|
|
|
2063
2077
|
// components/box/Box.tsx
|
|
2064
2078
|
var import_clsx15 = __toESM(require("clsx"));
|
|
2065
|
-
var
|
|
2066
|
-
var Box =
|
|
2079
|
+
var import_react14 = __toESM(require("react"));
|
|
2080
|
+
var Box = import_react14.default.forwardRef(
|
|
2067
2081
|
({
|
|
2068
2082
|
inverted,
|
|
2069
2083
|
children,
|
|
@@ -2105,7 +2119,7 @@ var Box = import_react12.default.forwardRef(
|
|
|
2105
2119
|
const hoverStyle = {
|
|
2106
2120
|
cursor: "pointer"
|
|
2107
2121
|
};
|
|
2108
|
-
return /* @__PURE__ */
|
|
2122
|
+
return /* @__PURE__ */ import_react14.default.createElement(
|
|
2109
2123
|
Tag2,
|
|
2110
2124
|
{
|
|
2111
2125
|
ref,
|
|
@@ -2135,8 +2149,8 @@ var Box_default = Box;
|
|
|
2135
2149
|
|
|
2136
2150
|
// components/box/content/BoxContent.tsx
|
|
2137
2151
|
var import_clsx16 = __toESM(require("clsx"));
|
|
2138
|
-
var
|
|
2139
|
-
var BoxContent =
|
|
2152
|
+
var React24 = __toESM(require("react"));
|
|
2153
|
+
var BoxContent = React24.forwardRef(
|
|
2140
2154
|
({ children, className, id, backgroundColor, backgroundSrc, ...others }, ref) => {
|
|
2141
2155
|
const { styled } = useTrilogyContext();
|
|
2142
2156
|
const classes = hashClass(
|
|
@@ -2148,7 +2162,7 @@ var BoxContent = React22.forwardRef(
|
|
|
2148
2162
|
className
|
|
2149
2163
|
)
|
|
2150
2164
|
);
|
|
2151
|
-
return /* @__PURE__ */
|
|
2165
|
+
return /* @__PURE__ */ React24.createElement(
|
|
2152
2166
|
"div",
|
|
2153
2167
|
{
|
|
2154
2168
|
ref,
|
|
@@ -2173,11 +2187,11 @@ var content_default = BoxContent_default;
|
|
|
2173
2187
|
|
|
2174
2188
|
// components/box/footer/BoxFooter.tsx
|
|
2175
2189
|
var import_clsx17 = __toESM(require("clsx"));
|
|
2176
|
-
var
|
|
2177
|
-
var BoxFooter =
|
|
2190
|
+
var React25 = __toESM(require("react"));
|
|
2191
|
+
var BoxFooter = React25.forwardRef(
|
|
2178
2192
|
({ className, children, backgroundColor, id, ...others }, ref) => {
|
|
2179
2193
|
const { styled } = useTrilogyContext();
|
|
2180
|
-
return /* @__PURE__ */
|
|
2194
|
+
return /* @__PURE__ */ React25.createElement(
|
|
2181
2195
|
"div",
|
|
2182
2196
|
{
|
|
2183
2197
|
ref,
|
|
@@ -2200,8 +2214,8 @@ var footer_default = BoxFooter_default;
|
|
|
2200
2214
|
|
|
2201
2215
|
// components/box/header/BoxHeader.tsx
|
|
2202
2216
|
var import_clsx18 = __toESM(require("clsx"));
|
|
2203
|
-
var
|
|
2204
|
-
var BoxHeader =
|
|
2217
|
+
var React26 = __toESM(require("react"));
|
|
2218
|
+
var BoxHeader = React26.forwardRef(
|
|
2205
2219
|
({ children, className, id, align, variant, ...others }, ref) => {
|
|
2206
2220
|
const { styled } = useTrilogyContext();
|
|
2207
2221
|
let alignClass = null;
|
|
@@ -2212,7 +2226,7 @@ var BoxHeader = React24.forwardRef(
|
|
|
2212
2226
|
styled,
|
|
2213
2227
|
(0, import_clsx18.default)("box-header", className, variant && has(getBackgroundClassName(variant)), align && alignClass)
|
|
2214
2228
|
);
|
|
2215
|
-
return /* @__PURE__ */
|
|
2229
|
+
return /* @__PURE__ */ React26.createElement("div", { ref, id, className: classes, ...others }, children && typeof children.valueOf() === "string" ? /* @__PURE__ */ React26.createElement("p", null, children) : children);
|
|
2216
2230
|
}
|
|
2217
2231
|
);
|
|
2218
2232
|
BoxHeader.displayName = "BoxHeader" /* BoxHeader */;
|
|
@@ -2223,11 +2237,11 @@ var header_default = BoxHeader_default;
|
|
|
2223
2237
|
|
|
2224
2238
|
// components/box/table-container/BoxTableContainer.tsx
|
|
2225
2239
|
var import_clsx19 = __toESM(require("clsx"));
|
|
2226
|
-
var
|
|
2227
|
-
var BoxTableContainer =
|
|
2240
|
+
var React27 = __toESM(require("react"));
|
|
2241
|
+
var BoxTableContainer = React27.forwardRef(
|
|
2228
2242
|
({ className, testId, ...others }, ref) => {
|
|
2229
2243
|
const { styled } = useTrilogyContext();
|
|
2230
|
-
return /* @__PURE__ */
|
|
2244
|
+
return /* @__PURE__ */ React27.createElement(
|
|
2231
2245
|
"div",
|
|
2232
2246
|
{
|
|
2233
2247
|
ref,
|
|
@@ -2246,11 +2260,11 @@ var table_container_default = BoxTableContainer_default;
|
|
|
2246
2260
|
|
|
2247
2261
|
// components/box/item/BoxItem.tsx
|
|
2248
2262
|
var import_clsx20 = __toESM(require("clsx"));
|
|
2249
|
-
var
|
|
2250
|
-
var BoxItem =
|
|
2263
|
+
var React28 = __toESM(require("react"));
|
|
2264
|
+
var BoxItem = React28.forwardRef(
|
|
2251
2265
|
({ className, id, children, ...others }, ref) => {
|
|
2252
2266
|
const { styled } = useTrilogyContext();
|
|
2253
|
-
return /* @__PURE__ */
|
|
2267
|
+
return /* @__PURE__ */ React28.createElement("div", { ref, id, className: hashClass(styled, (0, import_clsx20.default)("box-item", className)), ...others }, children);
|
|
2254
2268
|
}
|
|
2255
2269
|
);
|
|
2256
2270
|
BoxItem.displayName = "BoxItem" /* BoxItem */;
|
|
@@ -2273,11 +2287,11 @@ var item_default2 = BoxItem_default;
|
|
|
2273
2287
|
// components/breadcrumb/Breadcrumb.tsx
|
|
2274
2288
|
var import_locales2 = require("@trilogy-ds/locales");
|
|
2275
2289
|
var import_clsx21 = __toESM(require("clsx"));
|
|
2276
|
-
var
|
|
2277
|
-
var Breadcrumb =
|
|
2290
|
+
var React29 = __toESM(require("react"));
|
|
2291
|
+
var Breadcrumb = React29.forwardRef(
|
|
2278
2292
|
({ children, className, id, ...others }, ref) => {
|
|
2279
2293
|
const { styled } = useTrilogyContext();
|
|
2280
|
-
return /* @__PURE__ */
|
|
2294
|
+
return /* @__PURE__ */ React29.createElement(
|
|
2281
2295
|
"nav",
|
|
2282
2296
|
{
|
|
2283
2297
|
ref,
|
|
@@ -2287,7 +2301,7 @@ var Breadcrumb = React27.forwardRef(
|
|
|
2287
2301
|
"aria-label": import_locales2.breadcrumbLocale.accessibilityLabel,
|
|
2288
2302
|
...others
|
|
2289
2303
|
},
|
|
2290
|
-
/* @__PURE__ */
|
|
2304
|
+
/* @__PURE__ */ React29.createElement("ul", null, children)
|
|
2291
2305
|
);
|
|
2292
2306
|
}
|
|
2293
2307
|
);
|
|
@@ -2296,8 +2310,8 @@ var Breadcrumb_default = Breadcrumb;
|
|
|
2296
2310
|
|
|
2297
2311
|
// components/link/Link.tsx
|
|
2298
2312
|
var import_clsx22 = __toESM(require("clsx"));
|
|
2299
|
-
var
|
|
2300
|
-
var Link =
|
|
2313
|
+
var React30 = __toESM(require("react"));
|
|
2314
|
+
var Link = React30.forwardRef(
|
|
2301
2315
|
({
|
|
2302
2316
|
children,
|
|
2303
2317
|
className,
|
|
@@ -2318,7 +2332,7 @@ var Link = React28.forwardRef(
|
|
|
2318
2332
|
if (routerLink && to) {
|
|
2319
2333
|
const RouterLink = routerLink ? routerLink : "a";
|
|
2320
2334
|
const RouterLinkTrilogy = () => {
|
|
2321
|
-
return /* @__PURE__ */
|
|
2335
|
+
return /* @__PURE__ */ React30.createElement(
|
|
2322
2336
|
RouterLink,
|
|
2323
2337
|
{
|
|
2324
2338
|
ref,
|
|
@@ -2335,10 +2349,10 @@ var Link = React28.forwardRef(
|
|
|
2335
2349
|
children
|
|
2336
2350
|
);
|
|
2337
2351
|
};
|
|
2338
|
-
return /* @__PURE__ */
|
|
2352
|
+
return /* @__PURE__ */ React30.createElement(RouterLinkTrilogy, null);
|
|
2339
2353
|
}
|
|
2340
2354
|
const LinkTrilogy = () => {
|
|
2341
|
-
return /* @__PURE__ */
|
|
2355
|
+
return /* @__PURE__ */ React30.createElement(
|
|
2342
2356
|
"a",
|
|
2343
2357
|
{
|
|
2344
2358
|
ref,
|
|
@@ -2353,10 +2367,10 @@ var Link = React28.forwardRef(
|
|
|
2353
2367
|
},
|
|
2354
2368
|
...others
|
|
2355
2369
|
},
|
|
2356
|
-
iconName ? /* @__PURE__ */
|
|
2370
|
+
iconName ? /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement("span", null, children), /* @__PURE__ */ React30.createElement(Icon_default, { name: iconName, size: "small" /* SMALL */ })) : children
|
|
2357
2371
|
);
|
|
2358
2372
|
};
|
|
2359
|
-
return /* @__PURE__ */
|
|
2373
|
+
return /* @__PURE__ */ React30.createElement(LinkTrilogy, null);
|
|
2360
2374
|
}
|
|
2361
2375
|
);
|
|
2362
2376
|
Link.displayName = "Link" /* Link */;
|
|
@@ -2364,15 +2378,15 @@ var Link_default = Link;
|
|
|
2364
2378
|
|
|
2365
2379
|
// components/breadcrumb/item/BreadcrumbItem.tsx
|
|
2366
2380
|
var import_clsx23 = __toESM(require("clsx"));
|
|
2367
|
-
var
|
|
2368
|
-
var BreadcrumbItem =
|
|
2381
|
+
var React31 = __toESM(require("react"));
|
|
2382
|
+
var BreadcrumbItem = React31.forwardRef(
|
|
2369
2383
|
({ children, active, id, href, to, routerLink, testId, onClick, ...others }, ref) => {
|
|
2370
2384
|
const { styled } = useTrilogyContext();
|
|
2371
2385
|
if (routerLink && to) {
|
|
2372
2386
|
const RouterLink = routerLink ? routerLink : "a";
|
|
2373
|
-
return /* @__PURE__ */
|
|
2387
|
+
return /* @__PURE__ */ React31.createElement("li", { ref, id, "data-testid": testId, onClick, "aria-current": active ? "page" : void 0 }, /* @__PURE__ */ React31.createElement(RouterLink, { className: hashClass(styled, (0, import_clsx23.default)("link")), to, ...others }, children));
|
|
2374
2388
|
}
|
|
2375
|
-
return /* @__PURE__ */
|
|
2389
|
+
return /* @__PURE__ */ React31.createElement("li", { ref, id, onClick, "aria-current": active ? "page" : void 0 }, active ? children : /* @__PURE__ */ React31.createElement(Link_default, { href, ...others }, children));
|
|
2376
2390
|
}
|
|
2377
2391
|
);
|
|
2378
2392
|
BreadcrumbItem.displayName = "BreadcrumbItem" /* BreadcrumbItem */;
|
|
@@ -2380,7 +2394,7 @@ var BreadcrumbItem_default = BreadcrumbItem;
|
|
|
2380
2394
|
|
|
2381
2395
|
// components/button/Button.tsx
|
|
2382
2396
|
var import_clsx24 = __toESM(require("clsx"));
|
|
2383
|
-
var
|
|
2397
|
+
var import_react15 = __toESM(require("react"));
|
|
2384
2398
|
|
|
2385
2399
|
// components/button/ButtonEnum.ts
|
|
2386
2400
|
var ButtonMarkup = /* @__PURE__ */ ((ButtonMarkup2) => {
|
|
@@ -2404,7 +2418,7 @@ var ButtonVariant = /* @__PURE__ */ ((ButtonVariant3) => {
|
|
|
2404
2418
|
})(ButtonVariant || {});
|
|
2405
2419
|
|
|
2406
2420
|
// components/button/Button.tsx
|
|
2407
|
-
var Button =
|
|
2421
|
+
var Button = import_react15.default.forwardRef(
|
|
2408
2422
|
({
|
|
2409
2423
|
markup,
|
|
2410
2424
|
loading,
|
|
@@ -2442,7 +2456,7 @@ var Button = import_react13.default.forwardRef(
|
|
|
2442
2456
|
const classes = hashClass(styled, getClassNames(loading, variant, fullwidth, className));
|
|
2443
2457
|
const Tag2 = markup && isCorrectMarkup2(markup) ? markup : "button";
|
|
2444
2458
|
if (Tag2 === "button" && !href && !to) {
|
|
2445
|
-
return /* @__PURE__ */
|
|
2459
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
2446
2460
|
"button",
|
|
2447
2461
|
{
|
|
2448
2462
|
ref,
|
|
@@ -2458,12 +2472,12 @@ var Button = import_react13.default.forwardRef(
|
|
|
2458
2472
|
type: type != null ? type : "button",
|
|
2459
2473
|
...others
|
|
2460
2474
|
},
|
|
2461
|
-
iconName && /* @__PURE__ */
|
|
2475
|
+
iconName && /* @__PURE__ */ import_react15.default.createElement(Icon_default, { className: !children ? "is-marginless" : "", name: iconName }),
|
|
2462
2476
|
children
|
|
2463
2477
|
);
|
|
2464
2478
|
}
|
|
2465
2479
|
if (Tag2 === "input") {
|
|
2466
|
-
return /* @__PURE__ */
|
|
2480
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
2467
2481
|
"input",
|
|
2468
2482
|
{
|
|
2469
2483
|
ref,
|
|
@@ -2484,9 +2498,9 @@ var Button = import_react13.default.forwardRef(
|
|
|
2484
2498
|
}
|
|
2485
2499
|
if (routerLink && to && !isDisabled) {
|
|
2486
2500
|
const RouterLink = routerLink ? routerLink : "a";
|
|
2487
|
-
return /* @__PURE__ */
|
|
2501
|
+
return /* @__PURE__ */ import_react15.default.createElement(RouterLink, { ref, "aria-label": accessibilityLabel, to, className: classes, ...others }, iconName && /* @__PURE__ */ import_react15.default.createElement(Icon_default, { className: !children ? "is-marginless" : "", name: iconName }), children);
|
|
2488
2502
|
}
|
|
2489
|
-
return /* @__PURE__ */
|
|
2503
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
2490
2504
|
"a",
|
|
2491
2505
|
{
|
|
2492
2506
|
ref,
|
|
@@ -2501,7 +2515,7 @@ var Button = import_react13.default.forwardRef(
|
|
|
2501
2515
|
...others,
|
|
2502
2516
|
...disabled && { "aria-disabled": true }
|
|
2503
2517
|
},
|
|
2504
|
-
iconName && /* @__PURE__ */
|
|
2518
|
+
iconName && /* @__PURE__ */ import_react15.default.createElement(Icon_default, { className: !children ? "is-marginless" : "", name: iconName }),
|
|
2505
2519
|
children
|
|
2506
2520
|
);
|
|
2507
2521
|
}
|
|
@@ -2511,11 +2525,11 @@ var Button_default = Button;
|
|
|
2511
2525
|
|
|
2512
2526
|
// components/button/list/ButtonList.tsx
|
|
2513
2527
|
var import_clsx25 = __toESM(require("clsx"));
|
|
2514
|
-
var
|
|
2515
|
-
var ButtonList =
|
|
2528
|
+
var React33 = __toESM(require("react"));
|
|
2529
|
+
var ButtonList = React33.forwardRef(
|
|
2516
2530
|
({ className, id, align, direction, ...others }, ref) => {
|
|
2517
2531
|
const { styled } = useTrilogyContext();
|
|
2518
|
-
return /* @__PURE__ */
|
|
2532
|
+
return /* @__PURE__ */ React33.createElement(
|
|
2519
2533
|
"div",
|
|
2520
2534
|
{
|
|
2521
2535
|
ref,
|
|
@@ -2540,14 +2554,14 @@ var ButtonList_default = ButtonList;
|
|
|
2540
2554
|
// components/calendar/Calendar.tsx
|
|
2541
2555
|
var import_locales3 = require("@trilogy-ds/locales");
|
|
2542
2556
|
var import_clsx29 = __toESM(require("clsx"));
|
|
2543
|
-
var
|
|
2557
|
+
var import_react18 = __toESM(require("react"));
|
|
2544
2558
|
|
|
2545
2559
|
// components/select/Select.tsx
|
|
2546
|
-
var
|
|
2560
|
+
var React37 = __toESM(require("react"));
|
|
2547
2561
|
|
|
2548
2562
|
// components/select/context/index.tsx
|
|
2549
|
-
var
|
|
2550
|
-
var SelectContext =
|
|
2563
|
+
var import_react16 = __toESM(require("react"));
|
|
2564
|
+
var SelectContext = import_react16.default.createContext({
|
|
2551
2565
|
selectedOptionValues: [],
|
|
2552
2566
|
multiple: false,
|
|
2553
2567
|
custom: false,
|
|
@@ -2558,10 +2572,10 @@ var SelectContext = import_react14.default.createContext({
|
|
|
2558
2572
|
|
|
2559
2573
|
// components/select/web/SelectDynamic.tsx
|
|
2560
2574
|
var import_clsx26 = __toESM(require("clsx"));
|
|
2561
|
-
var
|
|
2575
|
+
var import_react17 = __toESM(require("react"));
|
|
2562
2576
|
var import_react_dom = __toESM(require("react-dom"));
|
|
2563
2577
|
var OPTION_SIZE = 48;
|
|
2564
|
-
var SelectDynamic =
|
|
2578
|
+
var SelectDynamic = import_react17.default.forwardRef(
|
|
2565
2579
|
({
|
|
2566
2580
|
onChange,
|
|
2567
2581
|
disabled,
|
|
@@ -2584,11 +2598,11 @@ var SelectDynamic = import_react15.default.forwardRef(
|
|
|
2584
2598
|
...others
|
|
2585
2599
|
}, ref) => {
|
|
2586
2600
|
const { styled } = useTrilogyContext();
|
|
2587
|
-
const { setIsVisibleOptions, isVisibleOptions, selectedOptionValues } = (0,
|
|
2588
|
-
const containerRef = (0,
|
|
2589
|
-
const [openUpward, setOpenUpward] = (0,
|
|
2590
|
-
const optionsListSize = (0,
|
|
2591
|
-
const [dropdownStyles, setDropdownStyles] = (0,
|
|
2601
|
+
const { setIsVisibleOptions, isVisibleOptions, selectedOptionValues } = (0, import_react17.useContext)(SelectContext);
|
|
2602
|
+
const containerRef = (0, import_react17.useRef)(null);
|
|
2603
|
+
const [openUpward, setOpenUpward] = (0, import_react17.useState)(false);
|
|
2604
|
+
const optionsListSize = (0, import_react17.useRef)(0);
|
|
2605
|
+
const [dropdownStyles, setDropdownStyles] = (0, import_react17.useState)({});
|
|
2592
2606
|
const selectClasses = hashClass(styled, (0, import_clsx26.default)("select", className));
|
|
2593
2607
|
const optionsClasses = hashClass(styled, (0, import_clsx26.default)("select-options", openUpward && "select-options-top"));
|
|
2594
2608
|
const portalClasses = hashClass(styled, "select-trilogy_modal_open");
|
|
@@ -2617,29 +2631,29 @@ var SelectDynamic = import_react15.default.forwardRef(
|
|
|
2617
2631
|
return prev;
|
|
2618
2632
|
});
|
|
2619
2633
|
};
|
|
2620
|
-
const options = (0,
|
|
2634
|
+
const options = (0, import_react17.useMemo)(() => {
|
|
2621
2635
|
var _a;
|
|
2622
|
-
return (_a =
|
|
2623
|
-
if (!
|
|
2636
|
+
return (_a = import_react17.default.Children.map(children, (child) => {
|
|
2637
|
+
if (!import_react17.default.isValidElement(child)) return false;
|
|
2624
2638
|
return {
|
|
2625
2639
|
label: child.props.children || child.props.label,
|
|
2626
2640
|
value: child.props.value
|
|
2627
2641
|
};
|
|
2628
2642
|
})) == null ? void 0 : _a.filter((option) => option);
|
|
2629
2643
|
}, []);
|
|
2630
|
-
const labelsSelected = (0,
|
|
2644
|
+
const labelsSelected = (0, import_react17.useMemo)(() => {
|
|
2631
2645
|
return selectedOptionValues.map((selectedOption) => {
|
|
2632
2646
|
const elm = options == null ? void 0 : options.find((opt) => opt.value === selectedOption);
|
|
2633
2647
|
return elm == null ? void 0 : elm.label;
|
|
2634
2648
|
});
|
|
2635
2649
|
}, [selectedOptionValues, options]);
|
|
2636
|
-
(0,
|
|
2637
|
-
const childrenCount =
|
|
2650
|
+
(0, import_react17.useEffect)(() => {
|
|
2651
|
+
const childrenCount = import_react17.default.Children.count(children);
|
|
2638
2652
|
if (childrenCount > 0) {
|
|
2639
2653
|
optionsListSize.current = childrenCount * OPTION_SIZE;
|
|
2640
2654
|
}
|
|
2641
2655
|
}, [children]);
|
|
2642
|
-
return /* @__PURE__ */
|
|
2656
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { className: selectClasses, ref: containerRef, ...others }, /* @__PURE__ */ import_react17.default.createElement(
|
|
2643
2657
|
Input_default,
|
|
2644
2658
|
{
|
|
2645
2659
|
sample,
|
|
@@ -2666,7 +2680,7 @@ var SelectDynamic = import_react15.default.forwardRef(
|
|
|
2666
2680
|
},
|
|
2667
2681
|
...{ readOnly: true, id, role: "combobox" }
|
|
2668
2682
|
}
|
|
2669
|
-
), /* @__PURE__ */
|
|
2683
|
+
), /* @__PURE__ */ import_react17.default.createElement(
|
|
2670
2684
|
"ul",
|
|
2671
2685
|
{
|
|
2672
2686
|
role: "listbox",
|
|
@@ -2678,7 +2692,7 @@ var SelectDynamic = import_react15.default.forwardRef(
|
|
|
2678
2692
|
},
|
|
2679
2693
|
children
|
|
2680
2694
|
), isVisibleOptions && import_react_dom.default.createPortal(
|
|
2681
|
-
/* @__PURE__ */
|
|
2695
|
+
/* @__PURE__ */ import_react17.default.createElement("div", { role: "presentation", className: portalClasses, onClick: onCloseOptions }),
|
|
2682
2696
|
document.body
|
|
2683
2697
|
));
|
|
2684
2698
|
}
|
|
@@ -2688,8 +2702,8 @@ var SelectDynamic_default = SelectDynamic;
|
|
|
2688
2702
|
|
|
2689
2703
|
// components/select/web/SelectNative.tsx
|
|
2690
2704
|
var import_clsx27 = __toESM(require("clsx"));
|
|
2691
|
-
var
|
|
2692
|
-
var SelectNative =
|
|
2705
|
+
var React36 = __toESM(require("react"));
|
|
2706
|
+
var SelectNative = React36.forwardRef(
|
|
2693
2707
|
({
|
|
2694
2708
|
onChange,
|
|
2695
2709
|
disabled,
|
|
@@ -2711,25 +2725,25 @@ var SelectNative = React34.forwardRef(
|
|
|
2711
2725
|
...others
|
|
2712
2726
|
}, ref) => {
|
|
2713
2727
|
const { styled } = useTrilogyContext();
|
|
2714
|
-
const idHelp =
|
|
2715
|
-
const idSample =
|
|
2716
|
-
const [focused, setIsFocused] =
|
|
2717
|
-
const [selectedValues, setSelectedValues] =
|
|
2728
|
+
const idHelp = React36.useId();
|
|
2729
|
+
const idSample = React36.useId();
|
|
2730
|
+
const [focused, setIsFocused] = React36.useState(false);
|
|
2731
|
+
const [selectedValues, setSelectedValues] = React36.useState(selected);
|
|
2718
2732
|
const selectClasses = hashClass(styled, (0, import_clsx27.default)("select", className));
|
|
2719
2733
|
const controlClass = hashClass(styled, (0, import_clsx27.default)("control", iconName && "has-icons-left"));
|
|
2720
2734
|
const helpClasses = (0, import_clsx27.default)("help", status && is(status));
|
|
2721
|
-
const handleFocus =
|
|
2735
|
+
const handleFocus = React36.useCallback((e) => {
|
|
2722
2736
|
setIsFocused(true);
|
|
2723
2737
|
onFocus && onFocus(e);
|
|
2724
2738
|
}, []);
|
|
2725
|
-
const handleBlur =
|
|
2739
|
+
const handleBlur = React36.useCallback((e) => {
|
|
2726
2740
|
setIsFocused(false);
|
|
2727
2741
|
onBlur && onBlur(e);
|
|
2728
2742
|
}, []);
|
|
2729
|
-
|
|
2743
|
+
React36.useEffect(() => {
|
|
2730
2744
|
setSelectedValues(selected);
|
|
2731
2745
|
}, [selected]);
|
|
2732
|
-
return /* @__PURE__ */
|
|
2746
|
+
return /* @__PURE__ */ React36.createElement("div", { className: selectClasses }, /* @__PURE__ */ React36.createElement("div", { className: hashClass(styled, (0, import_clsx27.default)("field", focused && "focus")) }, label && /* @__PURE__ */ React36.createElement("label", { className: hashClass(styled, "input-label"), htmlFor: id }, label, " ", required && /* @__PURE__ */ React36.createElement(Text_default, { markup: "span" /* SPAN */, typo: "has-text-error" /* TEXT_ERROR */ }, "*")), sample && /* @__PURE__ */ React36.createElement(Text_default, { className: "input-sample", level: 2 /* TWO */, id: idSample }, sample), /* @__PURE__ */ React36.createElement("div", { className: controlClass }, /* @__PURE__ */ React36.createElement(
|
|
2733
2747
|
"select",
|
|
2734
2748
|
{
|
|
2735
2749
|
ref,
|
|
@@ -2759,30 +2773,30 @@ var SelectNative = React34.forwardRef(
|
|
|
2759
2773
|
role: "listbox",
|
|
2760
2774
|
...others
|
|
2761
2775
|
},
|
|
2762
|
-
|
|
2763
|
-
if (!
|
|
2776
|
+
React36.Children.map(children, (child) => {
|
|
2777
|
+
if (!React36.isValidElement(child)) return null;
|
|
2764
2778
|
const props = {
|
|
2765
2779
|
...child.props,
|
|
2766
2780
|
native: "true"
|
|
2767
2781
|
};
|
|
2768
|
-
return /* @__PURE__ */
|
|
2782
|
+
return /* @__PURE__ */ React36.createElement(option_default, { ...props });
|
|
2769
2783
|
})
|
|
2770
|
-
), iconName && /* @__PURE__ */
|
|
2784
|
+
), iconName && /* @__PURE__ */ React36.createElement(Icon_default, { name: iconName, size: "small" })), help && /* @__PURE__ */ React36.createElement(Text_default, { className: helpClasses, id: idHelp }, help)));
|
|
2771
2785
|
}
|
|
2772
2786
|
);
|
|
2773
2787
|
SelectNative.displayName = "Select" /* Select */;
|
|
2774
2788
|
var SelectNative_default = SelectNative;
|
|
2775
2789
|
|
|
2776
2790
|
// components/select/Select.tsx
|
|
2777
|
-
var Select =
|
|
2778
|
-
const [isVisibleOptions, setIsVisibleOptions] =
|
|
2779
|
-
const [selectedOptionValues, setSelectedOptionValues] =
|
|
2780
|
-
|
|
2791
|
+
var Select = React37.forwardRef(({ selected, ...props }, ref) => {
|
|
2792
|
+
const [isVisibleOptions, setIsVisibleOptions] = React37.useState(false);
|
|
2793
|
+
const [selectedOptionValues, setSelectedOptionValues] = React37.useState([]);
|
|
2794
|
+
React37.useEffect(() => {
|
|
2781
2795
|
const value = typeof selected === "string" || typeof selected === "number" ? [selected] : !selected || selected === null ? [] : selected;
|
|
2782
2796
|
setSelectedOptionValues(value);
|
|
2783
2797
|
}, [selected]);
|
|
2784
2798
|
if (props.custom || props.multiple)
|
|
2785
|
-
return /* @__PURE__ */
|
|
2799
|
+
return /* @__PURE__ */ React37.createElement(
|
|
2786
2800
|
SelectContext.Provider,
|
|
2787
2801
|
{
|
|
2788
2802
|
value: {
|
|
@@ -2795,20 +2809,20 @@ var Select = React35.forwardRef(({ selected, ...props }, ref) => {
|
|
|
2795
2809
|
onChange: props.onChange
|
|
2796
2810
|
}
|
|
2797
2811
|
},
|
|
2798
|
-
/* @__PURE__ */
|
|
2812
|
+
/* @__PURE__ */ React37.createElement(SelectDynamic_default, { ref, selected, ...props })
|
|
2799
2813
|
);
|
|
2800
|
-
return /* @__PURE__ */
|
|
2814
|
+
return /* @__PURE__ */ React37.createElement(SelectNative_default, { ref, selected, ...props });
|
|
2801
2815
|
});
|
|
2802
2816
|
Select.displayName = "Select" /* Select */;
|
|
2803
2817
|
var Select_default = Select;
|
|
2804
2818
|
|
|
2805
2819
|
// components/select/option/SelectOption.tsx
|
|
2806
2820
|
var import_clsx28 = __toESM(require("clsx"));
|
|
2807
|
-
var
|
|
2808
|
-
var SelectOption =
|
|
2821
|
+
var React38 = __toESM(require("react"));
|
|
2822
|
+
var SelectOption = React38.forwardRef(
|
|
2809
2823
|
({ id, className, value = "", disabled, children, onClick, label, iconName, testId, ...others }, ref) => {
|
|
2810
2824
|
const { styled } = useTrilogyContext();
|
|
2811
|
-
const { custom, selectedOptionValues, setSelectedOptionValues, multiple, setIsVisibleOptions, onChange } =
|
|
2825
|
+
const { custom, selectedOptionValues, setSelectedOptionValues, multiple, setIsVisibleOptions, onChange } = React38.useContext(SelectContext);
|
|
2812
2826
|
const isChecked = selectedOptionValues.includes(value);
|
|
2813
2827
|
const selectClasses = hashClass(styled, (0, import_clsx28.default)("option", isChecked && "focus", disabled && is("disabled"), className));
|
|
2814
2828
|
const handleClickOption = () => {
|
|
@@ -2830,7 +2844,7 @@ var SelectOption = React36.forwardRef(
|
|
|
2830
2844
|
if (!multiple) setIsVisibleOptions(false);
|
|
2831
2845
|
};
|
|
2832
2846
|
if (custom || multiple) {
|
|
2833
|
-
return /* @__PURE__ */
|
|
2847
|
+
return /* @__PURE__ */ React38.createElement(
|
|
2834
2848
|
"li",
|
|
2835
2849
|
{
|
|
2836
2850
|
ref,
|
|
@@ -2843,11 +2857,11 @@ var SelectOption = React36.forwardRef(
|
|
|
2843
2857
|
onClick: !disabled ? handleClickOption : void 0,
|
|
2844
2858
|
...others
|
|
2845
2859
|
},
|
|
2846
|
-
iconName && /* @__PURE__ */
|
|
2860
|
+
iconName && /* @__PURE__ */ React38.createElement(Icon_default, { name: iconName }),
|
|
2847
2861
|
label || children
|
|
2848
2862
|
);
|
|
2849
2863
|
}
|
|
2850
|
-
return /* @__PURE__ */
|
|
2864
|
+
return /* @__PURE__ */ React38.createElement(
|
|
2851
2865
|
"option",
|
|
2852
2866
|
{
|
|
2853
2867
|
ref,
|
|
@@ -2892,7 +2906,7 @@ var currentDate = /* @__PURE__ */ new Date();
|
|
|
2892
2906
|
function checkIsRange(date) {
|
|
2893
2907
|
return !(date instanceof Date);
|
|
2894
2908
|
}
|
|
2895
|
-
var Calendar =
|
|
2909
|
+
var Calendar = import_react18.default.forwardRef(
|
|
2896
2910
|
({
|
|
2897
2911
|
value = currentDate,
|
|
2898
2912
|
minDate = new Date(currentDate.getFullYear() - 10, 0, 1),
|
|
@@ -2904,16 +2918,16 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
2904
2918
|
onMonthChange
|
|
2905
2919
|
}, ref) => {
|
|
2906
2920
|
const { styled } = useTrilogyContext();
|
|
2907
|
-
const [visibleMonth, setVisibleMonth] =
|
|
2921
|
+
const [visibleMonth, setVisibleMonth] = import_react18.default.useState(
|
|
2908
2922
|
value instanceof Date ? value : value[0] || currentDate
|
|
2909
2923
|
);
|
|
2910
|
-
const [activeDate, setActiveDate] =
|
|
2911
|
-
const [dateEndHovered, setDateEndHovered] =
|
|
2912
|
-
const refsDays =
|
|
2913
|
-
const refDayFocused =
|
|
2914
|
-
const refs =
|
|
2915
|
-
const weeksId =
|
|
2916
|
-
const daysId =
|
|
2924
|
+
const [activeDate, setActiveDate] = import_react18.default.useState(value);
|
|
2925
|
+
const [dateEndHovered, setDateEndHovered] = import_react18.default.useState();
|
|
2926
|
+
const refsDays = import_react18.default.useRef([]);
|
|
2927
|
+
const refDayFocused = import_react18.default.useRef();
|
|
2928
|
+
const refs = import_react18.default.useRef([]);
|
|
2929
|
+
const weeksId = import_react18.default.useId();
|
|
2930
|
+
const daysId = import_react18.default.useId();
|
|
2917
2931
|
const calendarClasses = hashClass(styled, (0, import_clsx29.default)("calendar"));
|
|
2918
2932
|
const calendarheaderClasses = hashClass(styled, (0, import_clsx29.default)("calendar-header"));
|
|
2919
2933
|
const headerDropdownClasses = hashClass(styled, (0, import_clsx29.default)("calendar-header-dropdown"));
|
|
@@ -2935,15 +2949,15 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
2935
2949
|
const rondedLeftClasses = hashClass(styled, (0, import_clsx29.default)("calendar-date-rounded-left"));
|
|
2936
2950
|
const rondedRightClasses = hashClass(styled, (0, import_clsx29.default)("calendar-date-rounded-right"));
|
|
2937
2951
|
const isRange = checkIsRange(activeDate);
|
|
2938
|
-
const isNextDisabled =
|
|
2952
|
+
const isNextDisabled = import_react18.default.useMemo(
|
|
2939
2953
|
() => disabled || (maxDate == null ? void 0 : maxDate.getMonth()) === (visibleMonth == null ? void 0 : visibleMonth.getMonth()) && (maxDate == null ? void 0 : maxDate.getFullYear()) === (visibleMonth == null ? void 0 : visibleMonth.getFullYear()),
|
|
2940
2954
|
[maxDate, visibleMonth, disabled]
|
|
2941
2955
|
);
|
|
2942
|
-
const isPrevDisabled =
|
|
2956
|
+
const isPrevDisabled = import_react18.default.useMemo(
|
|
2943
2957
|
() => disabled || (minDate == null ? void 0 : minDate.getMonth()) === (visibleMonth == null ? void 0 : visibleMonth.getMonth()) && (minDate == null ? void 0 : minDate.getFullYear()) === (visibleMonth == null ? void 0 : visibleMonth.getFullYear()),
|
|
2944
2958
|
[minDate, visibleMonth, disabled]
|
|
2945
2959
|
);
|
|
2946
|
-
const getAllDaysInMonth =
|
|
2960
|
+
const getAllDaysInMonth = import_react18.default.useCallback((year, month) => {
|
|
2947
2961
|
const date = new Date(year, month, 1);
|
|
2948
2962
|
const days2 = [];
|
|
2949
2963
|
const firstDayOfMonth = (date.getDay() + 6) % 7;
|
|
@@ -2954,7 +2968,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
2954
2968
|
for (let i = 0; i < days2.length; i += 7) allDays.push(days2.slice(i, i + 7));
|
|
2955
2969
|
return allDays;
|
|
2956
2970
|
}, []);
|
|
2957
|
-
const yearsBetween =
|
|
2971
|
+
const yearsBetween = import_react18.default.useMemo(() => {
|
|
2958
2972
|
const minYear = minDate.getFullYear();
|
|
2959
2973
|
const maxYear = maxDate.getFullYear();
|
|
2960
2974
|
const currentYear = value instanceof Date && (value == null ? void 0 : value.getFullYear());
|
|
@@ -2971,7 +2985,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
2971
2985
|
}
|
|
2972
2986
|
return years;
|
|
2973
2987
|
}, [minDate, maxDate, value]);
|
|
2974
|
-
const availableMonths =
|
|
2988
|
+
const availableMonths = import_react18.default.useMemo(() => {
|
|
2975
2989
|
const currentYear = visibleMonth.getFullYear();
|
|
2976
2990
|
const minYear = minDate.getFullYear();
|
|
2977
2991
|
const maxYear = maxDate.getFullYear();
|
|
@@ -2984,18 +2998,18 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
2984
2998
|
return true;
|
|
2985
2999
|
});
|
|
2986
3000
|
}, [minDate, maxDate, visibleMonth]);
|
|
2987
|
-
const availableYear =
|
|
3001
|
+
const availableYear = import_react18.default.useMemo(() => {
|
|
2988
3002
|
const minYear = minDate.getFullYear();
|
|
2989
3003
|
const maxYear = maxDate.getFullYear();
|
|
2990
3004
|
return Array.from({ length: maxYear - minYear + 1 }, (_, i) => minYear + i);
|
|
2991
3005
|
}, [minDate, maxDate, visibleMonth]);
|
|
2992
|
-
const allDaysInMonth =
|
|
3006
|
+
const allDaysInMonth = import_react18.default.useMemo(() => {
|
|
2993
3007
|
refsDays.current = [];
|
|
2994
3008
|
const activeYear = visibleMonth.getFullYear();
|
|
2995
3009
|
const activeMonth = visibleMonth.getMonth();
|
|
2996
3010
|
return getAllDaysInMonth(activeYear, activeMonth);
|
|
2997
3011
|
}, [visibleMonth]);
|
|
2998
|
-
const handleClickNextPrevMonth =
|
|
3012
|
+
const handleClickNextPrevMonth = import_react18.default.useCallback(
|
|
2999
3013
|
(month) => {
|
|
3000
3014
|
const nextMonth = new Date(visibleMonth.getFullYear(), visibleMonth.getMonth() + month, visibleMonth.getDate());
|
|
3001
3015
|
setVisibleMonth(nextMonth);
|
|
@@ -3003,7 +3017,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3003
3017
|
},
|
|
3004
3018
|
[visibleMonth, onMonthChange]
|
|
3005
3019
|
);
|
|
3006
|
-
const handleMonthSelect =
|
|
3020
|
+
const handleMonthSelect = import_react18.default.useCallback(
|
|
3007
3021
|
(selectedMonth) => {
|
|
3008
3022
|
const newDate = new Date(visibleMonth.getFullYear(), selectedMonth, visibleMonth.getDate());
|
|
3009
3023
|
setVisibleMonth(newDate);
|
|
@@ -3011,7 +3025,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3011
3025
|
},
|
|
3012
3026
|
[visibleMonth, onMonthChange, minDate, maxDate]
|
|
3013
3027
|
);
|
|
3014
|
-
const handleYearSelect =
|
|
3028
|
+
const handleYearSelect = import_react18.default.useCallback(
|
|
3015
3029
|
(selectedYear) => {
|
|
3016
3030
|
const newDate = new Date(selectedYear, visibleMonth.getMonth(), visibleMonth.getDate());
|
|
3017
3031
|
if (newDate.getTime() < minDate.getTime() || newDate.getTime() > maxDate.getTime()) {
|
|
@@ -3029,7 +3043,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3029
3043
|
},
|
|
3030
3044
|
[visibleMonth, onMonthChange, minDate, maxDate]
|
|
3031
3045
|
);
|
|
3032
|
-
const navigateInDaysWithKeyboard =
|
|
3046
|
+
const navigateInDaysWithKeyboard = import_react18.default.useCallback(
|
|
3033
3047
|
(currentIndex, nextIndex) => {
|
|
3034
3048
|
var _a;
|
|
3035
3049
|
const nextRef = refsDays.current[currentIndex + nextIndex];
|
|
@@ -3060,7 +3074,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3060
3074
|
},
|
|
3061
3075
|
[refsDays.current, refDayFocused.current, isNextDisabled, isPrevDisabled]
|
|
3062
3076
|
);
|
|
3063
|
-
const handlePressEnterInDays =
|
|
3077
|
+
const handlePressEnterInDays = import_react18.default.useCallback(
|
|
3064
3078
|
(e) => {
|
|
3065
3079
|
if (readOnly) return;
|
|
3066
3080
|
const elm = e.target;
|
|
@@ -3079,7 +3093,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3079
3093
|
},
|
|
3080
3094
|
[refsDays.current, onChange, readOnly, activeDate, isRange]
|
|
3081
3095
|
);
|
|
3082
|
-
const onKeyDownDay =
|
|
3096
|
+
const onKeyDownDay = import_react18.default.useCallback(
|
|
3083
3097
|
(e, index, isDisabled) => {
|
|
3084
3098
|
switch (e.key) {
|
|
3085
3099
|
case "ArrowRight":
|
|
@@ -3098,7 +3112,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3098
3112
|
},
|
|
3099
3113
|
[handlePressEnterInDays, navigateInDaysWithKeyboard]
|
|
3100
3114
|
);
|
|
3101
|
-
|
|
3115
|
+
import_react18.default.useEffect(() => {
|
|
3102
3116
|
var _a, _b;
|
|
3103
3117
|
if (refsDays.current) {
|
|
3104
3118
|
const activeDateIndex = refsDays.current.findIndex((day) => day.tabIndex === 0);
|
|
@@ -3114,7 +3128,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3114
3128
|
}
|
|
3115
3129
|
}
|
|
3116
3130
|
}, [refsDays.current, refDayFocused.current]);
|
|
3117
|
-
|
|
3131
|
+
import_react18.default.useEffect(() => {
|
|
3118
3132
|
const prevActiveDate = activeDate;
|
|
3119
3133
|
setActiveDate(value);
|
|
3120
3134
|
if (value instanceof Date) return setVisibleMonth(value);
|
|
@@ -3123,7 +3137,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3123
3137
|
if (isNewRangeSelection) return setVisibleMonth(value[0]);
|
|
3124
3138
|
}
|
|
3125
3139
|
}, [value]);
|
|
3126
|
-
return /* @__PURE__ */
|
|
3140
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
3127
3141
|
"table",
|
|
3128
3142
|
{
|
|
3129
3143
|
"data-calendar-trilogy": "",
|
|
@@ -3134,7 +3148,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3134
3148
|
isRange && activeDate.length === 1 && rangeInitClasses
|
|
3135
3149
|
)
|
|
3136
3150
|
},
|
|
3137
|
-
/* @__PURE__ */
|
|
3151
|
+
/* @__PURE__ */ import_react18.default.createElement("thead", { className: calendarheaderClasses }, /* @__PURE__ */ import_react18.default.createElement("tr", null, /* @__PURE__ */ import_react18.default.createElement("th", { colSpan: 1, className: calendarPrevMonthClasses }, /* @__PURE__ */ import_react18.default.createElement(
|
|
3138
3152
|
"button",
|
|
3139
3153
|
{
|
|
3140
3154
|
"data-focusable": !isPrevDisabled,
|
|
@@ -3146,8 +3160,8 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3146
3160
|
if (el && refs) refs.current[1] = el;
|
|
3147
3161
|
}
|
|
3148
3162
|
},
|
|
3149
|
-
/* @__PURE__ */
|
|
3150
|
-
)), /* @__PURE__ */
|
|
3163
|
+
/* @__PURE__ */ import_react18.default.createElement(Icon_default, { name: "tri-arrow-left" })
|
|
3164
|
+
)), /* @__PURE__ */ import_react18.default.createElement("th", { colSpan: 5, className: calendarActiveMonthClasses }, /* @__PURE__ */ import_react18.default.createElement("div", { className: headerDropdownClasses }, /* @__PURE__ */ import_react18.default.createElement(
|
|
3151
3165
|
Select_default,
|
|
3152
3166
|
{
|
|
3153
3167
|
"data-focusable": "true",
|
|
@@ -3157,8 +3171,8 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3157
3171
|
if (el && refs) refs.current[2] = el;
|
|
3158
3172
|
}
|
|
3159
3173
|
},
|
|
3160
|
-
months.map((monthName, monthIndex) => /* @__PURE__ */
|
|
3161
|
-
), /* @__PURE__ */
|
|
3174
|
+
months.map((monthName, monthIndex) => /* @__PURE__ */ import_react18.default.createElement(option_default, { key: monthIndex, value: String(monthIndex), disabled: !availableMonths[monthIndex] }, monthName))
|
|
3175
|
+
), /* @__PURE__ */ import_react18.default.createElement(
|
|
3162
3176
|
Select_default,
|
|
3163
3177
|
{
|
|
3164
3178
|
"data-focusable": "true",
|
|
@@ -3168,7 +3182,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3168
3182
|
if (el && refs) refs.current[3] = el;
|
|
3169
3183
|
}
|
|
3170
3184
|
},
|
|
3171
|
-
yearsBetween.map((year) => /* @__PURE__ */
|
|
3185
|
+
yearsBetween.map((year) => /* @__PURE__ */ import_react18.default.createElement(
|
|
3172
3186
|
option_default,
|
|
3173
3187
|
{
|
|
3174
3188
|
key: year.value,
|
|
@@ -3177,7 +3191,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3177
3191
|
},
|
|
3178
3192
|
String(year.value)
|
|
3179
3193
|
))
|
|
3180
|
-
))), /* @__PURE__ */
|
|
3194
|
+
))), /* @__PURE__ */ import_react18.default.createElement("th", { colSpan: 1, className: calendarNextMonthClasses }, /* @__PURE__ */ import_react18.default.createElement(
|
|
3181
3195
|
"button",
|
|
3182
3196
|
{
|
|
3183
3197
|
"data-focusable": !isNextDisabled,
|
|
@@ -3189,12 +3203,12 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3189
3203
|
if (el && refs) refs.current[4] = el;
|
|
3190
3204
|
}
|
|
3191
3205
|
},
|
|
3192
|
-
/* @__PURE__ */
|
|
3193
|
-
))), /* @__PURE__ */
|
|
3194
|
-
return /* @__PURE__ */
|
|
3206
|
+
/* @__PURE__ */ import_react18.default.createElement(Icon_default, { name: "tri-arrow-right" })
|
|
3207
|
+
))), /* @__PURE__ */ import_react18.default.createElement("tr", null, days.map((day, index) => {
|
|
3208
|
+
return /* @__PURE__ */ import_react18.default.createElement("td", { className: calendarDayLabelClasses, key: index }, /* @__PURE__ */ import_react18.default.createElement(Text_default, null, day.slice(0, 1)));
|
|
3195
3209
|
}))),
|
|
3196
|
-
/* @__PURE__ */
|
|
3197
|
-
return /* @__PURE__ */
|
|
3210
|
+
/* @__PURE__ */ import_react18.default.createElement("tbody", null, allDaysInMonth.map((week, weekIndex) => {
|
|
3211
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
3198
3212
|
"tr",
|
|
3199
3213
|
{
|
|
3200
3214
|
key: `${weeksId}_${weekIndex}`,
|
|
@@ -3214,7 +3228,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3214
3228
|
(date) => (date == null ? void 0 : date.getFullYear()) === (day == null ? void 0 : day.getFullYear()) && (date == null ? void 0 : date.getMonth()) === (day == null ? void 0 : day.getMonth()) && (date == null ? void 0 : date.getDate()) === (day == null ? void 0 : day.getDate())
|
|
3215
3229
|
)) || false;
|
|
3216
3230
|
const isInRange = isRange && activeDate[0] && dateEndHovered && day && day.getTime() >= activeDate[0].getTime() && day.getTime() < dateEndHovered.getTime() || isRange && activeDate[0] && activeDate[1] && day && day.getTime() >= activeDate[0].getTime() && day.getTime() < activeDate[1].getTime();
|
|
3217
|
-
return /* @__PURE__ */
|
|
3231
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
3218
3232
|
"td",
|
|
3219
3233
|
{
|
|
3220
3234
|
key: `${daysId}_${dayIndex}_${day == null ? void 0 : day.getTime()}`,
|
|
@@ -3229,7 +3243,7 @@ var Calendar = import_react16.default.forwardRef(
|
|
|
3229
3243
|
dayIndex === 6 && rondedRightClasses
|
|
3230
3244
|
)
|
|
3231
3245
|
},
|
|
3232
|
-
day && ind !== false && /* @__PURE__ */
|
|
3246
|
+
day && ind !== false && /* @__PURE__ */ import_react18.default.createElement(
|
|
3233
3247
|
"button",
|
|
3234
3248
|
{
|
|
3235
3249
|
disabled: isDisabled,
|
|
@@ -3267,9 +3281,9 @@ var Calendar_default = Calendar;
|
|
|
3267
3281
|
|
|
3268
3282
|
// components/card/Card.tsx
|
|
3269
3283
|
var import_clsx30 = __toESM(require("clsx"));
|
|
3270
|
-
var
|
|
3271
|
-
var CardContext = (0,
|
|
3272
|
-
var Card =
|
|
3284
|
+
var import_react19 = __toESM(require("react"));
|
|
3285
|
+
var CardContext = (0, import_react19.createContext)({ horizontal: false });
|
|
3286
|
+
var Card = import_react19.default.forwardRef(
|
|
3273
3287
|
({ className, id, flat, horizontal, floating, skeleton, onClick, reversed, href, fullheight, active, ...others }, ref) => {
|
|
3274
3288
|
const { styled } = useTrilogyContext();
|
|
3275
3289
|
const hoverStyle = {
|
|
@@ -3290,7 +3304,7 @@ var Card = import_react17.default.forwardRef(
|
|
|
3290
3304
|
)
|
|
3291
3305
|
);
|
|
3292
3306
|
if (href) {
|
|
3293
|
-
return /* @__PURE__ */
|
|
3307
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
3294
3308
|
"a",
|
|
3295
3309
|
{
|
|
3296
3310
|
ref,
|
|
@@ -3305,7 +3319,7 @@ var Card = import_react17.default.forwardRef(
|
|
|
3305
3319
|
}
|
|
3306
3320
|
);
|
|
3307
3321
|
}
|
|
3308
|
-
return /* @__PURE__ */
|
|
3322
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
3309
3323
|
"div",
|
|
3310
3324
|
{
|
|
3311
3325
|
ref,
|
|
@@ -3323,12 +3337,12 @@ var Card_default = Card;
|
|
|
3323
3337
|
|
|
3324
3338
|
// components/card/image/CardImage.tsx
|
|
3325
3339
|
var import_clsx31 = __toESM(require("clsx"));
|
|
3326
|
-
var
|
|
3327
|
-
var CardImage =
|
|
3340
|
+
var React41 = __toESM(require("react"));
|
|
3341
|
+
var CardImage = React41.forwardRef(
|
|
3328
3342
|
({ src, alt = "", className, id, size: size2, onClick, ...others }, ref) => {
|
|
3329
3343
|
const { styled } = useTrilogyContext();
|
|
3330
3344
|
const classes = hashClass(styled, (0, import_clsx31.default)("card-image", size2 && is(`${size2}`), className));
|
|
3331
|
-
return /* @__PURE__ */
|
|
3345
|
+
return /* @__PURE__ */ React41.createElement(
|
|
3332
3346
|
"div",
|
|
3333
3347
|
{
|
|
3334
3348
|
ref,
|
|
@@ -3339,7 +3353,7 @@ var CardImage = React39.forwardRef(
|
|
|
3339
3353
|
},
|
|
3340
3354
|
className: classes
|
|
3341
3355
|
},
|
|
3342
|
-
/* @__PURE__ */
|
|
3356
|
+
/* @__PURE__ */ React41.createElement("figure", { className: hashClass(styled, (0, import_clsx31.default)("image")), ...others }, /* @__PURE__ */ React41.createElement("img", { ...{ src: typeof src === "string" ? src : "" }, alt }))
|
|
3343
3357
|
);
|
|
3344
3358
|
}
|
|
3345
3359
|
);
|
|
@@ -3351,11 +3365,11 @@ var image_default = CardImage_default;
|
|
|
3351
3365
|
|
|
3352
3366
|
// components/card/content/CardContent.tsx
|
|
3353
3367
|
var import_clsx32 = __toESM(require("clsx"));
|
|
3354
|
-
var
|
|
3355
|
-
var CardContent =
|
|
3368
|
+
var React42 = __toESM(require("react"));
|
|
3369
|
+
var CardContent = React42.forwardRef(
|
|
3356
3370
|
({ children, className, id, ...others }, ref) => {
|
|
3357
3371
|
const { styled } = useTrilogyContext();
|
|
3358
|
-
return /* @__PURE__ */
|
|
3372
|
+
return /* @__PURE__ */ React42.createElement("div", { ref, id, className: hashClass(styled, (0, import_clsx32.default)("card-content", className)), ...others }, children);
|
|
3359
3373
|
}
|
|
3360
3374
|
);
|
|
3361
3375
|
CardContent.displayName = "CardContent" /* CardContent */;
|
|
@@ -3375,12 +3389,12 @@ var CardImageSize = /* @__PURE__ */ ((CardImageSize2) => {
|
|
|
3375
3389
|
|
|
3376
3390
|
// components/checkbox/Checkbox.tsx
|
|
3377
3391
|
var import_clsx33 = __toESM(require("clsx"));
|
|
3378
|
-
var
|
|
3379
|
-
var Checkbox =
|
|
3380
|
-
({ checked, className, disabled, readonly, id =
|
|
3392
|
+
var import_react20 = __toESM(require("react"));
|
|
3393
|
+
var Checkbox = import_react20.default.forwardRef(
|
|
3394
|
+
({ checked, className, disabled, readonly, id = import_react20.default.useId(), label, onChange, name, value, children, required, ...others }, ref) => {
|
|
3381
3395
|
const { styled } = useTrilogyContext();
|
|
3382
|
-
const [_checked, setChecked] = (0,
|
|
3383
|
-
(0,
|
|
3396
|
+
const [_checked, setChecked] = (0, import_react20.useState)(checked || false);
|
|
3397
|
+
(0, import_react20.useEffect)(() => {
|
|
3384
3398
|
if (!readonly) {
|
|
3385
3399
|
setChecked(checked || false);
|
|
3386
3400
|
}
|
|
@@ -3394,7 +3408,7 @@ var Checkbox = import_react18.default.forwardRef(
|
|
|
3394
3408
|
checkboxChecked: target.checked
|
|
3395
3409
|
}) : setChecked(target.checked);
|
|
3396
3410
|
};
|
|
3397
|
-
return /* @__PURE__ */
|
|
3411
|
+
return /* @__PURE__ */ import_react20.default.createElement("div", { ref, className: hashClass(styled, (0, import_clsx33.default)("checkbox", className)) }, /* @__PURE__ */ import_react20.default.createElement(
|
|
3398
3412
|
"input",
|
|
3399
3413
|
{
|
|
3400
3414
|
type: "checkbox",
|
|
@@ -3408,26 +3422,26 @@ var Checkbox = import_react18.default.forwardRef(
|
|
|
3408
3422
|
onChange: handleOnChange,
|
|
3409
3423
|
...others
|
|
3410
3424
|
}
|
|
3411
|
-
), /* @__PURE__ */
|
|
3425
|
+
), /* @__PURE__ */ import_react20.default.createElement("label", { htmlFor: id, className: hashClass(styled, (0, import_clsx33.default)("checkbox-label")) }, label != null ? label : children));
|
|
3412
3426
|
}
|
|
3413
3427
|
);
|
|
3414
3428
|
Checkbox.displayName = "Checkbox" /* Checkbox */;
|
|
3415
3429
|
var Checkbox_default = Checkbox;
|
|
3416
3430
|
|
|
3417
3431
|
// helpers/require/index.ts
|
|
3418
|
-
var
|
|
3419
|
-
var isRequiredChild = (children) =>
|
|
3420
|
-
(child) =>
|
|
3432
|
+
var import_react21 = __toESM(require("react"));
|
|
3433
|
+
var isRequiredChild = (children) => import_react21.default.Children.toArray(children).some(
|
|
3434
|
+
(child) => import_react21.default.isValidElement(child) && child.props.required
|
|
3421
3435
|
);
|
|
3422
3436
|
|
|
3423
3437
|
// components/checkbox/list/CheckboxList.tsx
|
|
3424
3438
|
var import_clsx34 = __toESM(require("clsx"));
|
|
3425
|
-
var
|
|
3426
|
-
var CheckboxList =
|
|
3439
|
+
var React45 = __toESM(require("react"));
|
|
3440
|
+
var CheckboxList = React45.forwardRef(
|
|
3427
3441
|
({ className, id, align, horizontalMobile, verticalDesktop, accessibilityLabelledBy, children, label, ...others }, ref) => {
|
|
3428
3442
|
const { styled } = useTrilogyContext();
|
|
3429
3443
|
const groupLabelClasses = hashClass(styled, "group-label");
|
|
3430
|
-
return /* @__PURE__ */
|
|
3444
|
+
return /* @__PURE__ */ React45.createElement(React45.Fragment, null, label && /* @__PURE__ */ React45.createElement("p", { className: groupLabelClasses }, label, isRequiredChild(children) && /* @__PURE__ */ React45.createElement(Text_default, { markup: "span" /* SPAN */, typo: "has-text-error" /* TEXT_ERROR */ }, " ", "*")), /* @__PURE__ */ React45.createElement(
|
|
3431
3445
|
"div",
|
|
3432
3446
|
{
|
|
3433
3447
|
ref,
|
|
@@ -3456,8 +3470,8 @@ var CheckboxList_default = CheckboxList;
|
|
|
3456
3470
|
|
|
3457
3471
|
// components/checkbox/tiles/CheckboxTiles.tsx
|
|
3458
3472
|
var import_clsx35 = __toESM(require("clsx"));
|
|
3459
|
-
var
|
|
3460
|
-
var CheckboxTiles =
|
|
3473
|
+
var React46 = __toESM(require("react"));
|
|
3474
|
+
var CheckboxTiles = React46.forwardRef(
|
|
3461
3475
|
({ id, className, children, align, verticalAlign, accessibilityLabelledBy, ...others }, ref) => {
|
|
3462
3476
|
const { styled } = useTrilogyContext();
|
|
3463
3477
|
let alignClass = null;
|
|
@@ -3468,7 +3482,7 @@ var CheckboxTiles = React44.forwardRef(
|
|
|
3468
3482
|
if (verticalAlign) {
|
|
3469
3483
|
verticalAlignClass = getAlignClassName(verticalAlign) === "aligned-start" && is("aligned-start") || getAlignClassName(verticalAlign) === "aligned-center" && is("aligned-center") || getAlignClassName(verticalAlign) === "aligned-end" && is("aligned-end") || getAlignClassName(verticalAlign) === "aligned-stretch" && is("aligned-stretch") || null;
|
|
3470
3484
|
}
|
|
3471
|
-
return /* @__PURE__ */
|
|
3485
|
+
return /* @__PURE__ */ React46.createElement(
|
|
3472
3486
|
"div",
|
|
3473
3487
|
{
|
|
3474
3488
|
ref,
|
|
@@ -3491,8 +3505,8 @@ var CheckboxTiles_default = CheckboxTiles;
|
|
|
3491
3505
|
|
|
3492
3506
|
// components/sticker/Sticker.tsx
|
|
3493
3507
|
var import_clsx36 = __toESM(require("clsx"));
|
|
3494
|
-
var
|
|
3495
|
-
var Sticker =
|
|
3508
|
+
var import_react22 = __toESM(require("react"));
|
|
3509
|
+
var Sticker = import_react22.default.forwardRef(({
|
|
3496
3510
|
className,
|
|
3497
3511
|
id,
|
|
3498
3512
|
variant,
|
|
@@ -3515,22 +3529,22 @@ var Sticker = import_react20.default.forwardRef(({
|
|
|
3515
3529
|
is("vcentered")
|
|
3516
3530
|
)
|
|
3517
3531
|
);
|
|
3518
|
-
return /* @__PURE__ */
|
|
3532
|
+
return /* @__PURE__ */ import_react22.default.createElement("p", { ref, id, className: classes, "aria-label": accessibilityLabel, ...others }, iconName && /* @__PURE__ */ import_react22.default.createElement(Icon_default, { size: small ? "smaller" /* SMALLER */ : "small" /* SMALL */, name: iconName }), label);
|
|
3519
3533
|
});
|
|
3520
3534
|
Sticker.displayName = "Sticker" /* Sticker */;
|
|
3521
3535
|
var Sticker_default = Sticker;
|
|
3522
3536
|
|
|
3523
3537
|
// components/checkbox/tiles/tile/CheckboxTile.tsx
|
|
3524
3538
|
var import_clsx37 = __toESM(require("clsx"));
|
|
3525
|
-
var
|
|
3526
|
-
var
|
|
3527
|
-
var CheckboxTile =
|
|
3539
|
+
var React48 = __toESM(require("react"));
|
|
3540
|
+
var import_react23 = require("react");
|
|
3541
|
+
var CheckboxTile = React48.forwardRef(
|
|
3528
3542
|
({
|
|
3529
3543
|
checked,
|
|
3530
3544
|
className,
|
|
3531
3545
|
disabled,
|
|
3532
3546
|
readonly,
|
|
3533
|
-
id =
|
|
3547
|
+
id = React48.useId(),
|
|
3534
3548
|
label,
|
|
3535
3549
|
onChange,
|
|
3536
3550
|
name,
|
|
@@ -3544,13 +3558,13 @@ var CheckboxTile = React46.forwardRef(
|
|
|
3544
3558
|
...others
|
|
3545
3559
|
}, ref) => {
|
|
3546
3560
|
const { styled } = useTrilogyContext();
|
|
3547
|
-
const [_checked, setChecked] = (0,
|
|
3548
|
-
(0,
|
|
3561
|
+
const [_checked, setChecked] = (0, import_react23.useState)(checked || false);
|
|
3562
|
+
(0, import_react23.useEffect)(() => {
|
|
3549
3563
|
if (!readonly) {
|
|
3550
3564
|
setChecked(checked || false);
|
|
3551
3565
|
}
|
|
3552
3566
|
}, [checked, readonly]);
|
|
3553
|
-
return /* @__PURE__ */
|
|
3567
|
+
return /* @__PURE__ */ React48.createElement("div", { ref, className: hashClass(styled, (0, import_clsx37.default)("checkbox-tile", horizontal && is("horizontal"), className)) }, /* @__PURE__ */ React48.createElement(
|
|
3554
3568
|
"input",
|
|
3555
3569
|
{
|
|
3556
3570
|
type: "checkbox",
|
|
@@ -3564,7 +3578,7 @@ var CheckboxTile = React46.forwardRef(
|
|
|
3564
3578
|
onChange: (e) => onChange ? onChange : setChecked(e.target.checked),
|
|
3565
3579
|
...others
|
|
3566
3580
|
}
|
|
3567
|
-
), /* @__PURE__ */
|
|
3581
|
+
), /* @__PURE__ */ React48.createElement("label", { htmlFor: id, className: hashClass(styled, (0, import_clsx37.default)("checkbox-label")) }, icon && /* @__PURE__ */ React48.createElement(Icon_default, { name: icon, size: "medium" /* MEDIUM */ }), horizontal ? /* @__PURE__ */ React48.createElement("span", null, /* @__PURE__ */ React48.createElement("span", { className: hashClass(styled, (0, import_clsx37.default)("checkbox-title")) }, label), description && /* @__PURE__ */ React48.createElement("span", { className: hashClass(styled, (0, import_clsx37.default)("checkbox-description")) }, description)) : /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement("span", { className: hashClass(styled, (0, import_clsx37.default)("checkbox-title")) }, label), description && /* @__PURE__ */ React48.createElement("span", { className: hashClass(styled, (0, import_clsx37.default)("checkbox-description")) }, description))), sticker && /* @__PURE__ */ React48.createElement(Sticker_default, { label: sticker, variant: stickerVariant, className: "checkbox-sticker", small: true }));
|
|
3568
3582
|
}
|
|
3569
3583
|
);
|
|
3570
3584
|
CheckboxTile.displayName = "CheckboxTiles" /* CheckboxTiles */;
|
|
@@ -3572,12 +3586,12 @@ var CheckboxTile_default = CheckboxTile;
|
|
|
3572
3586
|
|
|
3573
3587
|
// components/chips/Chips.tsx
|
|
3574
3588
|
var import_clsx38 = __toESM(require("clsx"));
|
|
3575
|
-
var
|
|
3576
|
-
var Chips =
|
|
3589
|
+
var import_react24 = __toESM(require("react"));
|
|
3590
|
+
var Chips = import_react24.default.forwardRef(
|
|
3577
3591
|
({ className, onClick, children, active, disabled, id, ...others }, ref) => {
|
|
3578
3592
|
const { styled } = useTrilogyContext();
|
|
3579
3593
|
const classes = hashClass(styled, (0, import_clsx38.default)("chips", active && is("active"), className));
|
|
3580
|
-
return /* @__PURE__ */
|
|
3594
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
3581
3595
|
"button",
|
|
3582
3596
|
{
|
|
3583
3597
|
ref,
|
|
@@ -3600,15 +3614,15 @@ var Chips_default = Chips;
|
|
|
3600
3614
|
|
|
3601
3615
|
// components/chips/list/ChipsList.tsx
|
|
3602
3616
|
var import_clsx39 = __toESM(require("clsx"));
|
|
3603
|
-
var
|
|
3604
|
-
var ChipsList =
|
|
3617
|
+
var React50 = __toESM(require("react"));
|
|
3618
|
+
var ChipsList = React50.forwardRef(
|
|
3605
3619
|
({ className, id, children, multiple, scrollable, accessibilityLabelledBy, ...others }, ref) => {
|
|
3606
3620
|
const { styled } = useTrilogyContext();
|
|
3607
3621
|
const classes = hashClass(
|
|
3608
3622
|
styled,
|
|
3609
3623
|
(0, import_clsx39.default)("chips-list", multiple && is("multiple"), scrollable && is("scrollable"), className)
|
|
3610
3624
|
);
|
|
3611
|
-
return /* @__PURE__ */
|
|
3625
|
+
return /* @__PURE__ */ React50.createElement("div", { ref, id, role: "group", "aria-labelledby": accessibilityLabelledBy, className: classes, ...others }, children);
|
|
3612
3626
|
}
|
|
3613
3627
|
);
|
|
3614
3628
|
ChipsList.displayName = "ChipsList" /* ChipsList */;
|
|
@@ -3616,8 +3630,8 @@ var ChipsList_default = ChipsList;
|
|
|
3616
3630
|
|
|
3617
3631
|
// components/columns/Columns.tsx
|
|
3618
3632
|
var import_clsx40 = __toESM(require("clsx"));
|
|
3619
|
-
var
|
|
3620
|
-
var Columns =
|
|
3633
|
+
var import_react25 = __toESM(require("react"));
|
|
3634
|
+
var Columns = import_react25.default.forwardRef(
|
|
3621
3635
|
({
|
|
3622
3636
|
className,
|
|
3623
3637
|
id,
|
|
@@ -3650,7 +3664,7 @@ var Columns = import_react23.default.forwardRef(
|
|
|
3650
3664
|
className
|
|
3651
3665
|
)
|
|
3652
3666
|
);
|
|
3653
|
-
return /* @__PURE__ */
|
|
3667
|
+
return /* @__PURE__ */ import_react25.default.createElement("div", { ref, id, className: classes, ...others });
|
|
3654
3668
|
}
|
|
3655
3669
|
);
|
|
3656
3670
|
Columns.displayName = "Columns" /* Columns */;
|
|
@@ -3658,8 +3672,8 @@ var Columns_default = Columns;
|
|
|
3658
3672
|
|
|
3659
3673
|
// components/columns/column/Column.tsx
|
|
3660
3674
|
var import_clsx41 = __toESM(require("clsx"));
|
|
3661
|
-
var
|
|
3662
|
-
var Column =
|
|
3675
|
+
var import_react26 = __toESM(require("react"));
|
|
3676
|
+
var Column = import_react26.default.forwardRef(
|
|
3663
3677
|
({
|
|
3664
3678
|
className,
|
|
3665
3679
|
id,
|
|
@@ -3705,7 +3719,7 @@ var Column = import_react24.default.forwardRef(
|
|
|
3705
3719
|
className
|
|
3706
3720
|
)
|
|
3707
3721
|
);
|
|
3708
|
-
return /* @__PURE__ */
|
|
3722
|
+
return /* @__PURE__ */ import_react26.default.createElement("div", { ref, id, className: classes, ...others });
|
|
3709
3723
|
}
|
|
3710
3724
|
);
|
|
3711
3725
|
Column.displayName = "Column" /* Column */;
|
|
@@ -3733,12 +3747,12 @@ var ColumnsGapValue = [0, 4, 8, 12, 16, 24, 32, 40, 48, 54, 62];
|
|
|
3733
3747
|
|
|
3734
3748
|
// components/container/Container.tsx
|
|
3735
3749
|
var import_clsx42 = __toESM(require("clsx"));
|
|
3736
|
-
var
|
|
3737
|
-
var Container =
|
|
3750
|
+
var import_react27 = __toESM(require("react"));
|
|
3751
|
+
var Container = import_react27.default.forwardRef(
|
|
3738
3752
|
({ className, id, medium, ...others }, ref) => {
|
|
3739
3753
|
const { styled } = useTrilogyContext();
|
|
3740
3754
|
const classes = hashClass(styled, (0, import_clsx42.default)("container", medium && is("medium"), className));
|
|
3741
|
-
return /* @__PURE__ */
|
|
3755
|
+
return /* @__PURE__ */ import_react27.default.createElement("div", { ref, id, className: classes, ...others });
|
|
3742
3756
|
}
|
|
3743
3757
|
);
|
|
3744
3758
|
Container.displayName = "Container" /* Container */;
|
|
@@ -3746,7 +3760,7 @@ var Container_default = Container;
|
|
|
3746
3760
|
|
|
3747
3761
|
// components/countdown/Countdown.tsx
|
|
3748
3762
|
var import_clsx43 = __toESM(require("clsx"));
|
|
3749
|
-
var
|
|
3763
|
+
var import_react28 = __toESM(require("react"));
|
|
3750
3764
|
|
|
3751
3765
|
// components/countdown/CountdownEnum.ts
|
|
3752
3766
|
var CountdownFormat = /* @__PURE__ */ ((CountdownFormat2) => {
|
|
@@ -3775,14 +3789,14 @@ var calculateTimer = (timeDifference) => {
|
|
|
3775
3789
|
const days2 = Math.floor(timeDifference / (1e3 * 60 * 60 * 24));
|
|
3776
3790
|
return { days: days2, hours, minutes, seconds };
|
|
3777
3791
|
};
|
|
3778
|
-
var Countdown =
|
|
3792
|
+
var Countdown = import_react28.default.forwardRef(
|
|
3779
3793
|
({ deadline, className, id, format, event, small, inverted, ...others }, ref) => {
|
|
3780
3794
|
const { styled } = useTrilogyContext();
|
|
3781
|
-
const [timeLeft] = (0,
|
|
3795
|
+
const [timeLeft] = (0, import_react28.useState)(deadline);
|
|
3782
3796
|
const initialTimeDifference = deadline.getTime() - (/* @__PURE__ */ new Date()).getTime();
|
|
3783
3797
|
const initialTimer = calculateTimer(initialTimeDifference);
|
|
3784
|
-
const [timer, setTimer] = (0,
|
|
3785
|
-
const [init, setInit] = (0,
|
|
3798
|
+
const [timer, setTimer] = (0, import_react28.useState)(initialTimer);
|
|
3799
|
+
const [init, setInit] = (0, import_react28.useState)(false);
|
|
3786
3800
|
const show = [timer.days != 0, timer.hours != 0, timer.minutes != 0, timer.seconds != 0];
|
|
3787
3801
|
const parsedFormat = format == null ? void 0 : format.split("-");
|
|
3788
3802
|
const classes = hashClass(styled, (0, import_clsx43.default)("countdown", inverted && is("inverted"), small && is("small"), className));
|
|
@@ -3811,7 +3825,7 @@ var Countdown = import_react26.default.forwardRef(
|
|
|
3811
3825
|
show[2 /* MIN */] = true;
|
|
3812
3826
|
show[3 /* SEC */] = true;
|
|
3813
3827
|
}
|
|
3814
|
-
(0,
|
|
3828
|
+
(0, import_react28.useEffect)(() => {
|
|
3815
3829
|
setInterval(() => {
|
|
3816
3830
|
const difference = timeLeft.getTime() - (/* @__PURE__ */ new Date()).getTime();
|
|
3817
3831
|
if (difference > 0) {
|
|
@@ -3853,23 +3867,23 @@ var Countdown = import_react26.default.forwardRef(
|
|
|
3853
3867
|
setInit(true);
|
|
3854
3868
|
}, 1e3);
|
|
3855
3869
|
}, [timeLeft, format]);
|
|
3856
|
-
(0,
|
|
3870
|
+
(0, import_react28.useEffect)(() => {
|
|
3857
3871
|
if (timer.days + timer.hours + timer.minutes + timer.seconds === 0 && event && init) {
|
|
3858
3872
|
event(null);
|
|
3859
3873
|
setInit(false);
|
|
3860
3874
|
}
|
|
3861
3875
|
}, [timer, event, init]);
|
|
3862
|
-
return /* @__PURE__ */
|
|
3876
|
+
return /* @__PURE__ */ import_react28.default.createElement("ul", { ref, id, className: classes, ...others }, (show[0 /* DAY */] || timer.days != 0) && /* @__PURE__ */ import_react28.default.createElement("li", { className: hashClass(styled, (0, import_clsx43.default)("count")) }, /* @__PURE__ */ import_react28.default.createElement("span", { className: hashClass(styled, (0, import_clsx43.default)("value")) }, timer.days ? timer.days : 0), "j"), (show[1 /* HOUR */] || timer.hours != 0) && /* @__PURE__ */ import_react28.default.createElement("li", { className: hashClass(styled, (0, import_clsx43.default)("count")) }, /* @__PURE__ */ import_react28.default.createElement("span", { className: hashClass(styled, (0, import_clsx43.default)("value")) }, timer.hours ? timer.hours : 0), "h"), (show[2 /* MIN */] || timer.minutes != 0) && /* @__PURE__ */ import_react28.default.createElement("li", { className: hashClass(styled, (0, import_clsx43.default)("count")) }, /* @__PURE__ */ import_react28.default.createElement("span", { className: hashClass(styled, (0, import_clsx43.default)("value")) }, timer.minutes ? timer.minutes : 0), "m"), (show[3 /* SEC */] || timer.seconds != 0) && /* @__PURE__ */ import_react28.default.createElement("li", { className: hashClass(styled, (0, import_clsx43.default)("count")) }, /* @__PURE__ */ import_react28.default.createElement("span", { className: hashClass(styled, (0, import_clsx43.default)("value")) }, timer.seconds ? timer.seconds : 0), "s"));
|
|
3863
3877
|
}
|
|
3864
3878
|
);
|
|
3865
3879
|
Countdown.displayName = "Countdown" /* Countdown */;
|
|
3866
3880
|
var Countdown_default = Countdown;
|
|
3867
3881
|
|
|
3868
3882
|
// helpers/clickOutside/index.ts
|
|
3869
|
-
var
|
|
3883
|
+
var import_react29 = require("react");
|
|
3870
3884
|
var useClickOutside = (ref, callback) => {
|
|
3871
|
-
const stableCallback = (0,
|
|
3872
|
-
(0,
|
|
3885
|
+
const stableCallback = (0, import_react29.useCallback)(callback, [callback]);
|
|
3886
|
+
(0, import_react29.useEffect)(() => {
|
|
3873
3887
|
const handleClickOutside = (event) => {
|
|
3874
3888
|
if (ref.current && !ref.current.contains(event.target)) {
|
|
3875
3889
|
stableCallback();
|
|
@@ -3884,14 +3898,14 @@ var useClickOutside = (ref, callback) => {
|
|
|
3884
3898
|
|
|
3885
3899
|
// components/datepicker/DatePicker.tsx
|
|
3886
3900
|
var import_clsx47 = __toESM(require("clsx"));
|
|
3887
|
-
var
|
|
3901
|
+
var import_react31 = __toESM(require("react"));
|
|
3888
3902
|
var import_react_dom2 = __toESM(require("react-dom"));
|
|
3889
3903
|
|
|
3890
3904
|
// components/modal/Modal.tsx
|
|
3891
3905
|
var import_locales4 = require("@trilogy-ds/locales");
|
|
3892
3906
|
var import_clsx44 = __toESM(require("clsx"));
|
|
3893
|
-
var
|
|
3894
|
-
var Modal =
|
|
3907
|
+
var import_react30 = __toESM(require("react"));
|
|
3908
|
+
var Modal = import_react30.default.forwardRef(
|
|
3895
3909
|
({
|
|
3896
3910
|
children,
|
|
3897
3911
|
className,
|
|
@@ -3907,15 +3921,15 @@ var Modal = import_react28.default.forwardRef(
|
|
|
3907
3921
|
title,
|
|
3908
3922
|
...others
|
|
3909
3923
|
}, ref) => {
|
|
3910
|
-
const modalContentRef = (0,
|
|
3911
|
-
const [display, setDisplay] = (0,
|
|
3924
|
+
const modalContentRef = (0, import_react30.useRef)(null);
|
|
3925
|
+
const [display, setDisplay] = (0, import_react30.useState)(active || false);
|
|
3912
3926
|
const { styled } = useTrilogyContext();
|
|
3913
|
-
const refBtnModal = (0,
|
|
3914
|
-
const refModal = (0,
|
|
3915
|
-
const modalGeneratedId = (0,
|
|
3916
|
-
const focusableElementsRef = (0,
|
|
3917
|
-
const currentFocusIndexRef = (0,
|
|
3918
|
-
const handleClose =
|
|
3927
|
+
const refBtnModal = (0, import_react30.useRef)(null);
|
|
3928
|
+
const refModal = (0, import_react30.useRef)(null);
|
|
3929
|
+
const modalGeneratedId = (0, import_react30.useId)();
|
|
3930
|
+
const focusableElementsRef = (0, import_react30.useRef)(null);
|
|
3931
|
+
const currentFocusIndexRef = (0, import_react30.useRef)(0);
|
|
3932
|
+
const handleClose = import_react30.default.useCallback(
|
|
3919
3933
|
(onCloseFunc, e) => {
|
|
3920
3934
|
if (!unClosable) {
|
|
3921
3935
|
setDisplay(false);
|
|
@@ -3929,7 +3943,7 @@ var Modal = import_react28.default.forwardRef(
|
|
|
3929
3943
|
styled,
|
|
3930
3944
|
(0, import_clsx44.default)("modal", display && is("active"), size2 && is(size2), panel && is("panel"), className)
|
|
3931
3945
|
);
|
|
3932
|
-
const onKeyDown = (0,
|
|
3946
|
+
const onKeyDown = (0, import_react30.useCallback)(
|
|
3933
3947
|
(e) => {
|
|
3934
3948
|
if (display && e.key === "Tab") {
|
|
3935
3949
|
e.preventDefault();
|
|
@@ -3951,7 +3965,7 @@ var Modal = import_react28.default.forwardRef(
|
|
|
3951
3965
|
},
|
|
3952
3966
|
[display, focusableElementsRef, currentFocusIndexRef, refBtnModal, onClose]
|
|
3953
3967
|
);
|
|
3954
|
-
(0,
|
|
3968
|
+
(0, import_react30.useEffect)(() => {
|
|
3955
3969
|
setDisplay((prev) => {
|
|
3956
3970
|
if (prev) {
|
|
3957
3971
|
refBtnModal.current && refBtnModal.current.focus();
|
|
@@ -3960,17 +3974,17 @@ var Modal = import_react28.default.forwardRef(
|
|
|
3960
3974
|
return active || false;
|
|
3961
3975
|
});
|
|
3962
3976
|
}, [active, currentFocusIndexRef, refBtnModal]);
|
|
3963
|
-
(0,
|
|
3977
|
+
(0, import_react30.useEffect)(() => {
|
|
3964
3978
|
!hideCloseButton && display && focusableElementsRef.current && focusableElementsRef.current[0].focus();
|
|
3965
3979
|
}, [hideCloseButton, display, focusableElementsRef]);
|
|
3966
|
-
(0,
|
|
3980
|
+
(0, import_react30.useEffect)(() => {
|
|
3967
3981
|
if (modalContentRef.current) {
|
|
3968
3982
|
focusableElementsRef.current = modalContentRef.current.querySelectorAll(
|
|
3969
3983
|
'button:not(:disabled), input:not(:disabled), a, select:not(:disabled), textarea:not(:disabled), details:not([aria-disabled="true"]) > summary'
|
|
3970
3984
|
);
|
|
3971
3985
|
}
|
|
3972
3986
|
}, [modalContentRef, focusableElementsRef]);
|
|
3973
|
-
return /* @__PURE__ */
|
|
3987
|
+
return /* @__PURE__ */ import_react30.default.createElement("div", { onKeyDown, ref: refModal }, trigger && import_react30.default.cloneElement(trigger, { ref: refBtnModal, "aria-haspopup": "dialog" }), /* @__PURE__ */ import_react30.default.createElement(
|
|
3974
3988
|
"div",
|
|
3975
3989
|
{
|
|
3976
3990
|
ref,
|
|
@@ -3987,7 +4001,7 @@ var Modal = import_react28.default.forwardRef(
|
|
|
3987
4001
|
},
|
|
3988
4002
|
...others
|
|
3989
4003
|
},
|
|
3990
|
-
/* @__PURE__ */
|
|
4004
|
+
/* @__PURE__ */ import_react30.default.createElement("div", { ref: modalContentRef, className: hashClass(styled, (0, import_clsx44.default)("modal-content")) }, /* @__PURE__ */ import_react30.default.createElement("div", { className: hashClass(styled, (0, import_clsx44.default)("modal-header")) }, !hideCloseButton && !unClosable && /* @__PURE__ */ import_react30.default.createElement(
|
|
3991
4005
|
"button",
|
|
3992
4006
|
{
|
|
3993
4007
|
onClick: (e) => {
|
|
@@ -3996,8 +4010,8 @@ var Modal = import_react28.default.forwardRef(
|
|
|
3996
4010
|
className: hashClass(styled, (0, import_clsx44.default)("modal-close", is("large"))),
|
|
3997
4011
|
type: "button" /* BUTTON */
|
|
3998
4012
|
},
|
|
3999
|
-
/* @__PURE__ */
|
|
4000
|
-
), /* @__PURE__ */
|
|
4013
|
+
/* @__PURE__ */ import_react30.default.createElement("span", { className: hashClass(styled, (0, import_clsx44.default)("sr-only")) }, import_locales4.modalLocale.accessibilityLabelButtonClose)
|
|
4014
|
+
), /* @__PURE__ */ import_react30.default.createElement(Title_default, { id: modalGeneratedId, level: 3 /* THREE */, markup: "h1" /* H1 */ }, title)), children && children)
|
|
4001
4015
|
));
|
|
4002
4016
|
}
|
|
4003
4017
|
);
|
|
@@ -4006,20 +4020,20 @@ var Modal_default = Modal;
|
|
|
4006
4020
|
|
|
4007
4021
|
// components/modal/footer/ModalFooter.tsx
|
|
4008
4022
|
var import_clsx45 = __toESM(require("clsx"));
|
|
4009
|
-
var
|
|
4010
|
-
var ModalFooter =
|
|
4023
|
+
var React56 = __toESM(require("react"));
|
|
4024
|
+
var ModalFooter = React56.forwardRef(({ children, className, id }, ref) => {
|
|
4011
4025
|
const { styled } = useTrilogyContext();
|
|
4012
|
-
return /* @__PURE__ */
|
|
4026
|
+
return /* @__PURE__ */ React56.createElement("div", { ref, "data-modal-footer": "", id, className: hashClass(styled, (0, import_clsx45.default)("modal-footer", className)) }, children);
|
|
4013
4027
|
});
|
|
4014
4028
|
ModalFooter.displayName = "ModalFooter" /* ModalFooter */;
|
|
4015
4029
|
var ModalFooter_default = ModalFooter;
|
|
4016
4030
|
|
|
4017
4031
|
// components/modal/body/ModalBody.tsx
|
|
4018
4032
|
var import_clsx46 = __toESM(require("clsx"));
|
|
4019
|
-
var
|
|
4020
|
-
var ModalBody =
|
|
4033
|
+
var React57 = __toESM(require("react"));
|
|
4034
|
+
var ModalBody = React57.forwardRef(({ children, className, id }, ref) => {
|
|
4021
4035
|
const { styled } = useTrilogyContext();
|
|
4022
|
-
return /* @__PURE__ */
|
|
4036
|
+
return /* @__PURE__ */ React57.createElement("div", { ref, id, className: hashClass(styled, (0, import_clsx46.default)("modal-body", className)) }, children);
|
|
4023
4037
|
});
|
|
4024
4038
|
ModalBody.displayName = "ModalBody" /* ModalBody */;
|
|
4025
4039
|
var ModalBody_default = ModalBody;
|
|
@@ -4063,7 +4077,7 @@ var getFirstDayFocusable = () => {
|
|
|
4063
4077
|
const firstOfMonth = calendar.querySelector(`[data-calendar-trilogy] tbody button:not(:disabled)`);
|
|
4064
4078
|
return (_a = activeDate != null ? activeDate : today) != null ? _a : firstOfMonth;
|
|
4065
4079
|
};
|
|
4066
|
-
var DatePicker = (0,
|
|
4080
|
+
var DatePicker = (0, import_react31.forwardRef)(
|
|
4067
4081
|
({
|
|
4068
4082
|
onChange,
|
|
4069
4083
|
value,
|
|
@@ -4077,29 +4091,29 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4077
4091
|
status,
|
|
4078
4092
|
disabled,
|
|
4079
4093
|
disabledDates,
|
|
4080
|
-
id =
|
|
4094
|
+
id = import_react31.default.useId(),
|
|
4081
4095
|
testId,
|
|
4082
4096
|
name,
|
|
4083
4097
|
...others
|
|
4084
4098
|
}, ref) => {
|
|
4085
4099
|
const { styled } = useTrilogyContext();
|
|
4086
4100
|
const { "data-cy": dataCy, ...otherProps } = others;
|
|
4087
|
-
const [day, setDay] = (0,
|
|
4088
|
-
const [month, setMonth] = (0,
|
|
4089
|
-
const [year, setYear] = (0,
|
|
4090
|
-
const [isOpenCalendar, setIsOpenCalendar] = (0,
|
|
4091
|
-
const [canContinueTyping, setCanContinueTyping] = (0,
|
|
4092
|
-
const [focused, setIsFocused] = (0,
|
|
4093
|
-
const [isMobile, setIsMobile] = (0,
|
|
4094
|
-
const [portalPosition, setPortalPosition] = (0,
|
|
4095
|
-
const refsSegment = (0,
|
|
4096
|
-
const refsFocusable = (0,
|
|
4097
|
-
const refContainer = (0,
|
|
4098
|
-
const refCalendar = (0,
|
|
4099
|
-
const currentFocusIndexRef = (0,
|
|
4100
|
-
const segmentFocused = (0,
|
|
4101
|
-
const refIcon = (0,
|
|
4102
|
-
const refInput = (0,
|
|
4101
|
+
const [day, setDay] = (0, import_react31.useState)("jj");
|
|
4102
|
+
const [month, setMonth] = (0, import_react31.useState)("mm");
|
|
4103
|
+
const [year, setYear] = (0, import_react31.useState)("aaaa");
|
|
4104
|
+
const [isOpenCalendar, setIsOpenCalendar] = (0, import_react31.useState)(false);
|
|
4105
|
+
const [canContinueTyping, setCanContinueTyping] = (0, import_react31.useState)(false);
|
|
4106
|
+
const [focused, setIsFocused] = (0, import_react31.useState)(false);
|
|
4107
|
+
const [isMobile, setIsMobile] = (0, import_react31.useState)(false);
|
|
4108
|
+
const [portalPosition, setPortalPosition] = (0, import_react31.useState)({ top: 0, left: 0, width: 0 });
|
|
4109
|
+
const refsSegment = (0, import_react31.useRef)([]);
|
|
4110
|
+
const refsFocusable = (0, import_react31.useRef)([]);
|
|
4111
|
+
const refContainer = (0, import_react31.useRef)(null);
|
|
4112
|
+
const refCalendar = (0, import_react31.useRef)(null);
|
|
4113
|
+
const currentFocusIndexRef = (0, import_react31.useRef)(0);
|
|
4114
|
+
const segmentFocused = (0, import_react31.useRef)(null);
|
|
4115
|
+
const refIcon = (0, import_react31.useRef)(null);
|
|
4116
|
+
const refInput = (0, import_react31.useRef)(null);
|
|
4103
4117
|
const calendarContainerClasses = hashClass(styled, (0, import_clsx47.default)("date-picker-calendar"));
|
|
4104
4118
|
const datePickerClasses = hashClass(styled, (0, import_clsx47.default)("field date-picker", className));
|
|
4105
4119
|
const controlClasses = hashClass(styled, (0, import_clsx47.default)("control", has("icons-right")));
|
|
@@ -4108,7 +4122,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4108
4122
|
const helpClasses = (0, import_clsx47.default)("help", status && is(status));
|
|
4109
4123
|
const inputLabelClasses = hashClass(styled, "input-label");
|
|
4110
4124
|
const inputHidden = hashClass(styled, "input-hidden");
|
|
4111
|
-
(0,
|
|
4125
|
+
(0, import_react31.useImperativeHandle)(ref, () => refContainer.current);
|
|
4112
4126
|
useClickOutside(refCalendar, () => {
|
|
4113
4127
|
setTimeout(() => {
|
|
4114
4128
|
setIsOpenCalendar(false);
|
|
@@ -4119,7 +4133,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4119
4133
|
setIsFocused(false);
|
|
4120
4134
|
}, 0);
|
|
4121
4135
|
});
|
|
4122
|
-
const segments = (0,
|
|
4136
|
+
const segments = (0, import_react31.useMemo)(
|
|
4123
4137
|
() => ({
|
|
4124
4138
|
day: {
|
|
4125
4139
|
sensitiveValue: 3,
|
|
@@ -4151,14 +4165,14 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4151
4165
|
}),
|
|
4152
4166
|
[day, month, year]
|
|
4153
4167
|
);
|
|
4154
|
-
const calendarValue = (0,
|
|
4168
|
+
const calendarValue = (0, import_react31.useMemo)(() => {
|
|
4155
4169
|
if (parseInt(day) && parseInt(month) && parseInt(year)) {
|
|
4156
4170
|
const newDate = /* @__PURE__ */ new Date(`${year}-${month}-${day}`);
|
|
4157
4171
|
const isValidDate = checkIsValidDate(newDate, year, month, day);
|
|
4158
4172
|
if (isValidDate) return newDate;
|
|
4159
4173
|
}
|
|
4160
4174
|
}, [day, month, year]);
|
|
4161
|
-
const calculatePortalPosition = (0,
|
|
4175
|
+
const calculatePortalPosition = (0, import_react31.useCallback)(() => {
|
|
4162
4176
|
if (!refInput.current) return;
|
|
4163
4177
|
const rect = refInput.current.getBoundingClientRect();
|
|
4164
4178
|
const { top, bottom, left, width } = rect;
|
|
@@ -4176,7 +4190,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4176
4190
|
width
|
|
4177
4191
|
});
|
|
4178
4192
|
}, []);
|
|
4179
|
-
const handleKeyPress = (0,
|
|
4193
|
+
const handleKeyPress = (0, import_react31.useCallback)(
|
|
4180
4194
|
({ event, type }) => {
|
|
4181
4195
|
if (disabled) return;
|
|
4182
4196
|
const key = event.data;
|
|
@@ -4221,7 +4235,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4221
4235
|
const isValidDate = parseInt(day) && parseInt(month) && parseInt(year);
|
|
4222
4236
|
return !isValidDate ? "" : `${year}-${month}-${day}`;
|
|
4223
4237
|
};
|
|
4224
|
-
const handleKeyDownDay = (0,
|
|
4238
|
+
const handleKeyDownDay = (0, import_react31.useCallback)(
|
|
4225
4239
|
(e, type) => {
|
|
4226
4240
|
if (disabled) return;
|
|
4227
4241
|
const { segmentSetter, label: label2, maxValue, initValue, segmentPosition, segment } = segments[type];
|
|
@@ -4283,7 +4297,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4283
4297
|
calculatePortalPosition();
|
|
4284
4298
|
setIsOpenCalendar(true);
|
|
4285
4299
|
};
|
|
4286
|
-
const handleChangeCalendar =
|
|
4300
|
+
const handleChangeCalendar = import_react31.default.useCallback(
|
|
4287
4301
|
(e) => {
|
|
4288
4302
|
const dateCalendar = e;
|
|
4289
4303
|
const dateDay = dateCalendar.getDate();
|
|
@@ -4300,7 +4314,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4300
4314
|
},
|
|
4301
4315
|
[onChange]
|
|
4302
4316
|
);
|
|
4303
|
-
const onKeyDown = (0,
|
|
4317
|
+
const onKeyDown = (0, import_react31.useCallback)(
|
|
4304
4318
|
(e) => {
|
|
4305
4319
|
var _a;
|
|
4306
4320
|
if (disabled) return;
|
|
@@ -4322,8 +4336,8 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4322
4336
|
},
|
|
4323
4337
|
[disabled, isOpenCalendar]
|
|
4324
4338
|
);
|
|
4325
|
-
const calendar = (0,
|
|
4326
|
-
return /* @__PURE__ */
|
|
4339
|
+
const calendar = (0, import_react31.useMemo)(() => {
|
|
4340
|
+
return /* @__PURE__ */ import_react31.default.createElement(
|
|
4327
4341
|
Calendar_default,
|
|
4328
4342
|
{
|
|
4329
4343
|
disabledDates,
|
|
@@ -4359,7 +4373,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4359
4373
|
isOpenCalendar,
|
|
4360
4374
|
refsFocusable
|
|
4361
4375
|
]);
|
|
4362
|
-
(0,
|
|
4376
|
+
(0, import_react31.useEffect)(() => {
|
|
4363
4377
|
if (!value) {
|
|
4364
4378
|
setDay("jj");
|
|
4365
4379
|
setMonth("mm");
|
|
@@ -4371,7 +4385,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4371
4385
|
setYear(year2);
|
|
4372
4386
|
}
|
|
4373
4387
|
}, [value]);
|
|
4374
|
-
(0,
|
|
4388
|
+
(0, import_react31.useEffect)(() => {
|
|
4375
4389
|
if (isOpenCalendar && refCalendar.current) {
|
|
4376
4390
|
const elms = refCalendar.current.querySelectorAll(`[data-focusable=true]`);
|
|
4377
4391
|
const firstDayFocusable = getFirstDayFocusable();
|
|
@@ -4384,13 +4398,13 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4384
4398
|
}
|
|
4385
4399
|
if (!isOpenCalendar && currentFocusIndexRef.current) currentFocusIndexRef.current = 0;
|
|
4386
4400
|
}, [isOpenCalendar, refCalendar, currentFocusIndexRef]);
|
|
4387
|
-
(0,
|
|
4401
|
+
(0, import_react31.useEffect)(() => {
|
|
4388
4402
|
const handleResize = () => setIsMobile(window.innerWidth <= 768);
|
|
4389
4403
|
handleResize();
|
|
4390
4404
|
window.addEventListener("resize", handleResize);
|
|
4391
4405
|
return () => window.removeEventListener("resize", handleResize);
|
|
4392
4406
|
}, []);
|
|
4393
|
-
(0,
|
|
4407
|
+
(0, import_react31.useEffect)(() => {
|
|
4394
4408
|
if (!isOpenCalendar) return;
|
|
4395
4409
|
const handleUpdate = () => calculatePortalPosition();
|
|
4396
4410
|
window.addEventListener("scroll", handleUpdate, true);
|
|
@@ -4400,7 +4414,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4400
4414
|
window.removeEventListener("resize", handleUpdate);
|
|
4401
4415
|
};
|
|
4402
4416
|
}, [isOpenCalendar, calculatePortalPosition]);
|
|
4403
|
-
return /* @__PURE__ */
|
|
4417
|
+
return /* @__PURE__ */ import_react31.default.createElement("div", { ref: refContainer, className: datePickerClasses, onKeyDown }, label && /* @__PURE__ */ import_react31.default.createElement("label", { className: inputLabelClasses, htmlFor: id }, label, " ", required && /* @__PURE__ */ import_react31.default.createElement(Text_default, { markup: "span" /* SPAN */, typo: "has-text-error" /* TEXT_ERROR */ }, "*")), sample && /* @__PURE__ */ import_react31.default.createElement(Text_default, { className: "input-sample", level: 2 /* TWO */ }, sample), /* @__PURE__ */ import_react31.default.createElement("div", { className: controlClasses }, /* @__PURE__ */ import_react31.default.createElement(
|
|
4404
4418
|
"div",
|
|
4405
4419
|
{
|
|
4406
4420
|
role: "group",
|
|
@@ -4418,7 +4432,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4418
4432
|
},
|
|
4419
4433
|
...otherProps
|
|
4420
4434
|
},
|
|
4421
|
-
/* @__PURE__ */
|
|
4435
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
|
4422
4436
|
"span",
|
|
4423
4437
|
{
|
|
4424
4438
|
"aria-valuemin": 1,
|
|
@@ -4445,8 +4459,8 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4445
4459
|
},
|
|
4446
4460
|
day
|
|
4447
4461
|
),
|
|
4448
|
-
/* @__PURE__ */
|
|
4449
|
-
/* @__PURE__ */
|
|
4462
|
+
/* @__PURE__ */ import_react31.default.createElement("span", null, "/"),
|
|
4463
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
|
4450
4464
|
"span",
|
|
4451
4465
|
{
|
|
4452
4466
|
"aria-valuemin": 1,
|
|
@@ -4473,8 +4487,8 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4473
4487
|
},
|
|
4474
4488
|
month
|
|
4475
4489
|
),
|
|
4476
|
-
/* @__PURE__ */
|
|
4477
|
-
/* @__PURE__ */
|
|
4490
|
+
/* @__PURE__ */ import_react31.default.createElement("span", null, "/"),
|
|
4491
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
|
4478
4492
|
"span",
|
|
4479
4493
|
{
|
|
4480
4494
|
"aria-valuemin": 0,
|
|
@@ -4501,7 +4515,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4501
4515
|
},
|
|
4502
4516
|
year
|
|
4503
4517
|
),
|
|
4504
|
-
/* @__PURE__ */
|
|
4518
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
|
4505
4519
|
"input",
|
|
4506
4520
|
{
|
|
4507
4521
|
disabled,
|
|
@@ -4521,7 +4535,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4521
4535
|
}
|
|
4522
4536
|
}
|
|
4523
4537
|
)
|
|
4524
|
-
), /* @__PURE__ */
|
|
4538
|
+
), /* @__PURE__ */ import_react31.default.createElement(
|
|
4525
4539
|
"button",
|
|
4526
4540
|
{
|
|
4527
4541
|
type: "button",
|
|
@@ -4533,9 +4547,9 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4533
4547
|
setIsFocused(false);
|
|
4534
4548
|
}
|
|
4535
4549
|
},
|
|
4536
|
-
/* @__PURE__ */
|
|
4537
|
-
)), help && /* @__PURE__ */
|
|
4538
|
-
/* @__PURE__ */
|
|
4550
|
+
/* @__PURE__ */ import_react31.default.createElement(Icon_default, { name: "tri-calendar", className: iconRightClasses })
|
|
4551
|
+
)), help && /* @__PURE__ */ import_react31.default.createElement(Text_default, { className: helpClasses }, help), isOpenCalendar && !isMobile && import_react_dom2.default.createPortal(
|
|
4552
|
+
/* @__PURE__ */ import_react31.default.createElement(
|
|
4539
4553
|
"div",
|
|
4540
4554
|
{
|
|
4541
4555
|
className: calendarContainerClasses,
|
|
@@ -4550,7 +4564,7 @@ var DatePicker = (0, import_react29.forwardRef)(
|
|
|
4550
4564
|
calendar
|
|
4551
4565
|
),
|
|
4552
4566
|
document.body
|
|
4553
|
-
), isOpenCalendar && isMobile && /* @__PURE__ */
|
|
4567
|
+
), isOpenCalendar && isMobile && /* @__PURE__ */ import_react31.default.createElement(Modal_default, { active: isOpenCalendar, hideCloseButton: true }, /* @__PURE__ */ import_react31.default.createElement(ModalBody_default, null, calendar)));
|
|
4554
4568
|
}
|
|
4555
4569
|
);
|
|
4556
4570
|
DatePicker.displayName = "DatePicker" /* DatePicker */;
|
|
@@ -4558,8 +4572,8 @@ var DatePicker_default = DatePicker;
|
|
|
4558
4572
|
|
|
4559
4573
|
// components/divider/Divider.tsx
|
|
4560
4574
|
var import_clsx48 = __toESM(require("clsx"));
|
|
4561
|
-
var
|
|
4562
|
-
var Divider =
|
|
4575
|
+
var import_react32 = __toESM(require("react"));
|
|
4576
|
+
var Divider = import_react32.default.forwardRef(({
|
|
4563
4577
|
className,
|
|
4564
4578
|
id,
|
|
4565
4579
|
unboxed,
|
|
@@ -4582,15 +4596,15 @@ var Divider = import_react30.default.forwardRef(({
|
|
|
4582
4596
|
)
|
|
4583
4597
|
);
|
|
4584
4598
|
const contentClasses = hashClass(styled, (0, import_clsx48.default)("divider-content"));
|
|
4585
|
-
return /* @__PURE__ */
|
|
4599
|
+
return /* @__PURE__ */ import_react32.default.createElement("div", { ref, id, "data-testid": "separator", className: classes, ...others }, /* @__PURE__ */ import_react32.default.createElement("p", { className: contentClasses }, iconName && !content && /* @__PURE__ */ import_react32.default.createElement(Icon_default, { name: iconName, size: "medium" /* MEDIUM */ }), content && content));
|
|
4586
4600
|
});
|
|
4587
4601
|
Divider.displayName = "Divider" /* Divider */;
|
|
4588
4602
|
var Divider_default = Divider;
|
|
4589
4603
|
|
|
4590
4604
|
// components/fab/Fab.tsx
|
|
4591
4605
|
var import_clsx49 = __toESM(require("clsx"));
|
|
4592
|
-
var
|
|
4593
|
-
var Fab =
|
|
4606
|
+
var import_react33 = __toESM(require("react"));
|
|
4607
|
+
var Fab = import_react33.default.forwardRef(({
|
|
4594
4608
|
children,
|
|
4595
4609
|
extended,
|
|
4596
4610
|
iconName,
|
|
@@ -4607,8 +4621,8 @@ var Fab = import_react31.default.forwardRef(({
|
|
|
4607
4621
|
...others
|
|
4608
4622
|
}, ref) => {
|
|
4609
4623
|
const { styled } = useTrilogyContext();
|
|
4610
|
-
const [isExtended, setIsExtended] = (0,
|
|
4611
|
-
(0,
|
|
4624
|
+
const [isExtended, setIsExtended] = (0, import_react33.useState)(extended || false);
|
|
4625
|
+
(0, import_react33.useEffect)(() => {
|
|
4612
4626
|
setIsExtended(extended || false);
|
|
4613
4627
|
}, [isExtended]);
|
|
4614
4628
|
const positionStyle = top || bottom || left || right ? {
|
|
@@ -4621,7 +4635,7 @@ var Fab = import_react31.default.forwardRef(({
|
|
|
4621
4635
|
position: "relative"
|
|
4622
4636
|
};
|
|
4623
4637
|
const _className = hashClass(styled, (0, import_clsx49.default)("fab", extended && is("extended"), className));
|
|
4624
|
-
return /* @__PURE__ */
|
|
4638
|
+
return /* @__PURE__ */ import_react33.default.createElement(
|
|
4625
4639
|
"button",
|
|
4626
4640
|
{
|
|
4627
4641
|
ref,
|
|
@@ -4636,7 +4650,7 @@ var Fab = import_react31.default.forwardRef(({
|
|
|
4636
4650
|
...others,
|
|
4637
4651
|
className: _className
|
|
4638
4652
|
},
|
|
4639
|
-
/* @__PURE__ */
|
|
4653
|
+
/* @__PURE__ */ import_react33.default.createElement(Icon_default, { name: iconName }),
|
|
4640
4654
|
children
|
|
4641
4655
|
);
|
|
4642
4656
|
});
|
|
@@ -4645,7 +4659,7 @@ var Fab_default = Fab;
|
|
|
4645
4659
|
|
|
4646
4660
|
// components/flex-box/FlexBox.tsx
|
|
4647
4661
|
var import_clsx50 = __toESM(require("clsx"));
|
|
4648
|
-
var
|
|
4662
|
+
var import_react34 = __toESM(require("react"));
|
|
4649
4663
|
var generateClassNames = ({ value, getClassName }) => {
|
|
4650
4664
|
if (!value) return [];
|
|
4651
4665
|
if (typeof value === "string" || typeof value === "number") {
|
|
@@ -4668,7 +4682,7 @@ var generateWrapClassNames = ({ value, getClassName }) => {
|
|
|
4668
4682
|
}
|
|
4669
4683
|
return [];
|
|
4670
4684
|
};
|
|
4671
|
-
var FlexBox =
|
|
4685
|
+
var FlexBox = import_react34.default.forwardRef(
|
|
4672
4686
|
({ className, id, gap, direction, align, justify, wrap, scrollable, fullheight, mobile, ...others }, ref) => {
|
|
4673
4687
|
const { styled } = useTrilogyContext();
|
|
4674
4688
|
const classes = hashClass(
|
|
@@ -4686,7 +4700,7 @@ var FlexBox = import_react32.default.forwardRef(
|
|
|
4686
4700
|
className
|
|
4687
4701
|
])
|
|
4688
4702
|
);
|
|
4689
|
-
return /* @__PURE__ */
|
|
4703
|
+
return /* @__PURE__ */ import_react34.default.createElement("div", { ref, id, className: classes, ...others });
|
|
4690
4704
|
}
|
|
4691
4705
|
);
|
|
4692
4706
|
FlexBox.displayName = "FlexBox" /* FlexBox */;
|
|
@@ -4694,8 +4708,8 @@ var FlexBox_default = FlexBox;
|
|
|
4694
4708
|
|
|
4695
4709
|
// components/flex-box/flex-item/FlexItem.tsx
|
|
4696
4710
|
var import_clsx51 = __toESM(require("clsx"));
|
|
4697
|
-
var
|
|
4698
|
-
var FlexItem =
|
|
4711
|
+
var import_react35 = __toESM(require("react"));
|
|
4712
|
+
var FlexItem = import_react35.default.forwardRef(
|
|
4699
4713
|
({ className, id, size: size2, narrow, verticalAlign, ...others }, ref) => {
|
|
4700
4714
|
const { styled } = useTrilogyContext();
|
|
4701
4715
|
const isNumber = typeof size2 === "number";
|
|
@@ -4715,7 +4729,7 @@ var FlexItem = import_react33.default.forwardRef(
|
|
|
4715
4729
|
className
|
|
4716
4730
|
)
|
|
4717
4731
|
);
|
|
4718
|
-
return /* @__PURE__ */
|
|
4732
|
+
return /* @__PURE__ */ import_react35.default.createElement("div", { ref, id, className: classes, ...others });
|
|
4719
4733
|
}
|
|
4720
4734
|
);
|
|
4721
4735
|
FlexItem.displayName = "FlexItem" /* FlexItem */;
|
|
@@ -4723,8 +4737,8 @@ var FlexItem_default = FlexItem;
|
|
|
4723
4737
|
|
|
4724
4738
|
// components/hero/Hero.tsx
|
|
4725
4739
|
var import_clsx52 = __toESM(require("clsx"));
|
|
4726
|
-
var
|
|
4727
|
-
var Hero =
|
|
4740
|
+
var import_react36 = __toESM(require("react"));
|
|
4741
|
+
var Hero = import_react36.default.forwardRef(
|
|
4728
4742
|
({ children, backgroundColor, backgroundSrc, inverted, className, id, onClick, overlap, ...others }, ref) => {
|
|
4729
4743
|
const { styled } = useTrilogyContext();
|
|
4730
4744
|
const classes = hashClass(
|
|
@@ -4738,7 +4752,7 @@ var Hero = import_react34.default.forwardRef(
|
|
|
4738
4752
|
className
|
|
4739
4753
|
)
|
|
4740
4754
|
);
|
|
4741
|
-
return /* @__PURE__ */
|
|
4755
|
+
return /* @__PURE__ */ import_react36.default.createElement(
|
|
4742
4756
|
"section",
|
|
4743
4757
|
{
|
|
4744
4758
|
ref,
|
|
@@ -4750,7 +4764,7 @@ var Hero = import_react34.default.forwardRef(
|
|
|
4750
4764
|
},
|
|
4751
4765
|
...others
|
|
4752
4766
|
},
|
|
4753
|
-
/* @__PURE__ */
|
|
4767
|
+
/* @__PURE__ */ import_react36.default.createElement("div", { className: hashClass(styled, (0, import_clsx52.default)("hero-body")) }, children)
|
|
4754
4768
|
);
|
|
4755
4769
|
}
|
|
4756
4770
|
);
|
|
@@ -4776,8 +4790,8 @@ var RadiusValues = /* @__PURE__ */ ((RadiusValues2) => {
|
|
|
4776
4790
|
|
|
4777
4791
|
// components/image/Image.tsx
|
|
4778
4792
|
var import_clsx53 = __toESM(require("clsx"));
|
|
4779
|
-
var
|
|
4780
|
-
var Image =
|
|
4793
|
+
var React64 = __toESM(require("react"));
|
|
4794
|
+
var Image = React64.forwardRef(({
|
|
4781
4795
|
src,
|
|
4782
4796
|
alt = "",
|
|
4783
4797
|
className,
|
|
@@ -4798,7 +4812,7 @@ var Image = React62.forwardRef(({
|
|
|
4798
4812
|
height
|
|
4799
4813
|
}
|
|
4800
4814
|
};
|
|
4801
|
-
return /* @__PURE__ */
|
|
4815
|
+
return /* @__PURE__ */ React64.createElement(
|
|
4802
4816
|
"figure",
|
|
4803
4817
|
{
|
|
4804
4818
|
ref,
|
|
@@ -4810,7 +4824,7 @@ var Image = React62.forwardRef(({
|
|
|
4810
4824
|
className: classes,
|
|
4811
4825
|
...others
|
|
4812
4826
|
},
|
|
4813
|
-
/* @__PURE__ */
|
|
4827
|
+
/* @__PURE__ */ React64.createElement(
|
|
4814
4828
|
"img",
|
|
4815
4829
|
{
|
|
4816
4830
|
style: styles.image,
|
|
@@ -4826,43 +4840,43 @@ var Image_default = Image;
|
|
|
4826
4840
|
|
|
4827
4841
|
// components/list/List.tsx
|
|
4828
4842
|
var import_clsx54 = __toESM(require("clsx"));
|
|
4829
|
-
var
|
|
4830
|
-
var List =
|
|
4843
|
+
var React65 = __toESM(require("react"));
|
|
4844
|
+
var List = React65.forwardRef(({ className, id, children, testId, divider, ordered, ...others }, ref) => {
|
|
4831
4845
|
const { styled } = useTrilogyContext();
|
|
4832
4846
|
const classes = hashClass(styled, (0, import_clsx54.default)("list", divider && has("divider"), className));
|
|
4833
4847
|
const Tag2 = ordered ? "ol" : "ul";
|
|
4834
|
-
return /* @__PURE__ */
|
|
4848
|
+
return /* @__PURE__ */ React65.createElement(Tag2, { ref, id, "data-testid": testId, className: classes, ...others }, children);
|
|
4835
4849
|
});
|
|
4836
4850
|
List.displayName = "List" /* List */;
|
|
4837
4851
|
var List_default = List;
|
|
4838
4852
|
|
|
4839
4853
|
// components/list/item/ListItem.tsx
|
|
4840
4854
|
var import_clsx55 = __toESM(require("clsx"));
|
|
4841
|
-
var
|
|
4842
|
-
var ListItem =
|
|
4855
|
+
var React66 = __toESM(require("react"));
|
|
4856
|
+
var ListItem = React66.forwardRef(({ className, id, children, iconName, status, testId }, ref) => {
|
|
4843
4857
|
const { styled } = useTrilogyContext();
|
|
4844
4858
|
const classes = (0, import_clsx55.default)("list-item", className, status && is(getColorClassName(TrilogyColor[status])));
|
|
4845
|
-
return /* @__PURE__ */
|
|
4859
|
+
return /* @__PURE__ */ React66.createElement("li", { ref, id, className: hashClass(styled, (0, import_clsx55.default)(classes)), "data-testid": testId }, iconName && /* @__PURE__ */ React66.createElement(
|
|
4846
4860
|
Icon_default,
|
|
4847
4861
|
{
|
|
4848
4862
|
className: status && (0, import_clsx55.default)(is(getColorClassName(TrilogyColor[status]))),
|
|
4849
4863
|
name: iconName,
|
|
4850
4864
|
size: "small" /* SMALL */
|
|
4851
4865
|
}
|
|
4852
|
-
), /* @__PURE__ */
|
|
4866
|
+
), /* @__PURE__ */ React66.createElement("div", { className: hashClass(styled, (0, import_clsx55.default)("list-item-content")) }, children));
|
|
4853
4867
|
});
|
|
4854
4868
|
ListItem.displayName = "ListItem" /* ListItem */;
|
|
4855
4869
|
var ListItem_default = ListItem;
|
|
4856
4870
|
|
|
4857
4871
|
// components/list/item/description/ListItemDescription.tsx
|
|
4858
4872
|
var import_clsx56 = __toESM(require("clsx"));
|
|
4859
|
-
var
|
|
4860
|
-
var ListItemDescription =
|
|
4873
|
+
var React67 = __toESM(require("react"));
|
|
4874
|
+
var ListItemDescription = React67.forwardRef(({
|
|
4861
4875
|
children,
|
|
4862
4876
|
className
|
|
4863
4877
|
}, ref) => {
|
|
4864
4878
|
const { styled } = useTrilogyContext();
|
|
4865
|
-
return /* @__PURE__ */
|
|
4879
|
+
return /* @__PURE__ */ React67.createElement("dd", { ref, className: hashClass(styled, (0, import_clsx56.default)(className)) }, children);
|
|
4866
4880
|
});
|
|
4867
4881
|
ListItemDescription.displayName = "ListItemDescription" /* ListItemDescription */;
|
|
4868
4882
|
var ListItemDescription_default = ListItemDescription;
|
|
@@ -4879,7 +4893,7 @@ var ListIconStatus = /* @__PURE__ */ ((ListIconStatus2) => {
|
|
|
4879
4893
|
// components/otp/Otp.tsx
|
|
4880
4894
|
var import_locales5 = require("@trilogy-ds/locales");
|
|
4881
4895
|
var import_clsx57 = __toESM(require("clsx"));
|
|
4882
|
-
var
|
|
4896
|
+
var import_react37 = __toESM(require("react"));
|
|
4883
4897
|
var stringToCode = (str, codeSize) => {
|
|
4884
4898
|
if (!str) return new Array(codeSize).fill(null);
|
|
4885
4899
|
return str.split("").map((char) => char === "" ? null : Number(char));
|
|
@@ -4936,7 +4950,7 @@ var inputOnKeyUp = (e) => {
|
|
|
4936
4950
|
var formatTranslation = (translation, x, y) => {
|
|
4937
4951
|
return translation.replace(/:x/g, x).replace(/:y/g, y);
|
|
4938
4952
|
};
|
|
4939
|
-
var Otp =
|
|
4953
|
+
var Otp = import_react37.default.forwardRef(
|
|
4940
4954
|
({
|
|
4941
4955
|
className,
|
|
4942
4956
|
id,
|
|
@@ -4952,18 +4966,18 @@ var Otp = import_react35.default.forwardRef(
|
|
|
4952
4966
|
autoFocus,
|
|
4953
4967
|
...others
|
|
4954
4968
|
}, ref) => {
|
|
4955
|
-
const [codeInput, setCodeInput] = (0,
|
|
4969
|
+
const [codeInput, setCodeInput] = (0, import_react37.useState)(
|
|
4956
4970
|
stringToCode(value, length) || new Array(length).fill(null)
|
|
4957
4971
|
);
|
|
4958
|
-
const hasChanged = (0,
|
|
4972
|
+
const hasChanged = (0, import_react37.useRef)(false);
|
|
4959
4973
|
const { styled } = useTrilogyContext();
|
|
4960
4974
|
const classes = hashClass(styled, (0, import_clsx57.default)("otp-list", error && is("error"), className));
|
|
4961
|
-
(0,
|
|
4975
|
+
(0, import_react37.useEffect)(() => {
|
|
4962
4976
|
if (!disabled) {
|
|
4963
4977
|
isCompleted(codeInput) && (onCompleted == null ? void 0 : onCompleted(codeToString(codeInput)));
|
|
4964
4978
|
}
|
|
4965
4979
|
}, [length, codeInput, onCompleted, disabled]);
|
|
4966
|
-
(0,
|
|
4980
|
+
(0, import_react37.useEffect)(() => {
|
|
4967
4981
|
hasChanged.current = codeInput.find((code) => code !== null) !== void 0;
|
|
4968
4982
|
if (hasChanged.current) {
|
|
4969
4983
|
onChange == null ? void 0 : onChange(codeToString(codeInput));
|
|
@@ -4986,14 +5000,14 @@ var Otp = import_react35.default.forwardRef(
|
|
|
4986
5000
|
const { target } = e;
|
|
4987
5001
|
target.setSelectionRange(0, target.value.length);
|
|
4988
5002
|
};
|
|
4989
|
-
return /* @__PURE__ */
|
|
5003
|
+
return /* @__PURE__ */ import_react37.default.createElement(import_react37.default.Fragment, null, label && /* @__PURE__ */ import_react37.default.createElement(
|
|
4990
5004
|
Text_default,
|
|
4991
5005
|
{
|
|
4992
5006
|
markup: "p" /* P */,
|
|
4993
5007
|
typo: disabled && "has-text-grey" /* TEXT_NEUTRAL */ || error && "has-text-error" /* TEXT_ERROR */ || "has-text-main" /* TEXT_MAIN */
|
|
4994
5008
|
},
|
|
4995
5009
|
label
|
|
4996
|
-
), /* @__PURE__ */
|
|
5010
|
+
), /* @__PURE__ */ import_react37.default.createElement(
|
|
4997
5011
|
"div",
|
|
4998
5012
|
{
|
|
4999
5013
|
ref,
|
|
@@ -5005,7 +5019,7 @@ var Otp = import_react35.default.forwardRef(
|
|
|
5005
5019
|
}
|
|
5006
5020
|
}
|
|
5007
5021
|
},
|
|
5008
|
-
codeInput.map((digit, idx) => /* @__PURE__ */
|
|
5022
|
+
codeInput.map((digit, idx) => /* @__PURE__ */ import_react37.default.createElement(
|
|
5009
5023
|
"input",
|
|
5010
5024
|
{
|
|
5011
5025
|
"aria-disabled": disabled,
|
|
@@ -5026,7 +5040,7 @@ var Otp = import_react35.default.forwardRef(
|
|
|
5026
5040
|
...others
|
|
5027
5041
|
}
|
|
5028
5042
|
))
|
|
5029
|
-
), help && /* @__PURE__ */
|
|
5043
|
+
), help && /* @__PURE__ */ import_react37.default.createElement(
|
|
5030
5044
|
Text_default,
|
|
5031
5045
|
{
|
|
5032
5046
|
className: hashClass(styled, (0, import_clsx57.default)("help")),
|
|
@@ -5042,8 +5056,8 @@ var Otp_default = Otp;
|
|
|
5042
5056
|
|
|
5043
5057
|
// components/pagination/Pagination.tsx
|
|
5044
5058
|
var import_clsx58 = __toESM(require("clsx"));
|
|
5045
|
-
var
|
|
5046
|
-
var Pagination =
|
|
5059
|
+
var import_react38 = __toESM(require("react"));
|
|
5060
|
+
var Pagination = import_react38.default.forwardRef(({
|
|
5047
5061
|
className,
|
|
5048
5062
|
id,
|
|
5049
5063
|
length,
|
|
@@ -5052,11 +5066,11 @@ var Pagination = import_react36.default.forwardRef(({
|
|
|
5052
5066
|
href,
|
|
5053
5067
|
...others
|
|
5054
5068
|
}, ref) => {
|
|
5055
|
-
const [currentPage, setCurrentPage] = (0,
|
|
5069
|
+
const [currentPage, setCurrentPage] = (0, import_react38.useState)(defaultPage);
|
|
5056
5070
|
const { styled } = useTrilogyContext();
|
|
5057
5071
|
const classes = hashClass(styled, (0, import_clsx58.default)("pagination", className));
|
|
5058
|
-
const prevCurrentPage = (0,
|
|
5059
|
-
const pager =
|
|
5072
|
+
const prevCurrentPage = (0, import_react38.useRef)(currentPage);
|
|
5073
|
+
const pager = import_react38.default.useMemo(() => {
|
|
5060
5074
|
let startPage = 1;
|
|
5061
5075
|
let endPage = 5;
|
|
5062
5076
|
if (length <= 5) {
|
|
@@ -5082,17 +5096,17 @@ var Pagination = import_react36.default.forwardRef(({
|
|
|
5082
5096
|
pages
|
|
5083
5097
|
};
|
|
5084
5098
|
}, [currentPage, length]);
|
|
5085
|
-
(0,
|
|
5099
|
+
(0, import_react38.useEffect)(() => {
|
|
5086
5100
|
if (onClick && prevCurrentPage.current !== pager.currentPage) {
|
|
5087
5101
|
onClick(pager);
|
|
5088
5102
|
}
|
|
5089
5103
|
setCurrentPage(pager.currentPage);
|
|
5090
5104
|
prevCurrentPage.current = pager.currentPage;
|
|
5091
5105
|
}, [pager.currentPage]);
|
|
5092
|
-
(0,
|
|
5106
|
+
(0, import_react38.useEffect)(() => {
|
|
5093
5107
|
setCurrentPage(defaultPage);
|
|
5094
5108
|
}, [defaultPage]);
|
|
5095
|
-
return /* @__PURE__ */
|
|
5109
|
+
return /* @__PURE__ */ import_react38.default.createElement("nav", { ref, id, className: classes, ...others }, /* @__PURE__ */ import_react38.default.createElement(
|
|
5096
5110
|
"a",
|
|
5097
5111
|
{
|
|
5098
5112
|
className: hashClass(styled, (0, import_clsx58.default)("pagination-previous")),
|
|
@@ -5104,8 +5118,8 @@ var Pagination = import_react36.default.forwardRef(({
|
|
|
5104
5118
|
},
|
|
5105
5119
|
href: href == null ? void 0 : href(currentPage - 1)
|
|
5106
5120
|
},
|
|
5107
|
-
/* @__PURE__ */
|
|
5108
|
-
), /* @__PURE__ */
|
|
5121
|
+
/* @__PURE__ */ import_react38.default.createElement(Icon_default, { name: "tri-arrow-left" /* ARROW_LEFT */ })
|
|
5122
|
+
), /* @__PURE__ */ import_react38.default.createElement("ul", { className: hashClass(styled, (0, import_clsx58.default)("pagination-list")) }, !pager.pages.includes(1) && /* @__PURE__ */ import_react38.default.createElement("li", null, /* @__PURE__ */ import_react38.default.createElement("span", { className: hashClass(styled, (0, import_clsx58.default)("pagination-ellipsis")) }, "\u2026")), pager.pages.map((pageNumber) => /* @__PURE__ */ import_react38.default.createElement("li", { key: pageNumber }, /* @__PURE__ */ import_react38.default.createElement(
|
|
5109
5123
|
"a",
|
|
5110
5124
|
{
|
|
5111
5125
|
className: hashClass(styled, (0, import_clsx58.default)("pagination-link")),
|
|
@@ -5117,7 +5131,7 @@ var Pagination = import_react36.default.forwardRef(({
|
|
|
5117
5131
|
href: href == null ? void 0 : href(pageNumber)
|
|
5118
5132
|
},
|
|
5119
5133
|
pageNumber
|
|
5120
|
-
))), !pager.pages.includes(length) && /* @__PURE__ */
|
|
5134
|
+
))), !pager.pages.includes(length) && /* @__PURE__ */ import_react38.default.createElement("li", null, /* @__PURE__ */ import_react38.default.createElement("span", { className: hashClass(styled, (0, import_clsx58.default)("pagination-ellipsis")) }, "\u2026"))), /* @__PURE__ */ import_react38.default.createElement(
|
|
5121
5135
|
"a",
|
|
5122
5136
|
{
|
|
5123
5137
|
className: hashClass(styled, (0, import_clsx58.default)("pagination-next")),
|
|
@@ -5129,7 +5143,7 @@ var Pagination = import_react36.default.forwardRef(({
|
|
|
5129
5143
|
},
|
|
5130
5144
|
href: href == null ? void 0 : href(currentPage + 1)
|
|
5131
5145
|
},
|
|
5132
|
-
/* @__PURE__ */
|
|
5146
|
+
/* @__PURE__ */ import_react38.default.createElement(Icon_default, { name: "tri-arrow-right" /* ARROW_RIGHT */ })
|
|
5133
5147
|
));
|
|
5134
5148
|
});
|
|
5135
5149
|
Pagination.displayName = "Pagination" /* Pagination */;
|
|
@@ -5137,8 +5151,8 @@ var Pagination_default = Pagination;
|
|
|
5137
5151
|
|
|
5138
5152
|
// components/popover/Popover.tsx
|
|
5139
5153
|
var import_clsx59 = __toESM(require("clsx"));
|
|
5140
|
-
var
|
|
5141
|
-
var Popover =
|
|
5154
|
+
var React70 = __toESM(require("react"));
|
|
5155
|
+
var Popover = React70.forwardRef(
|
|
5142
5156
|
({ className, id, direction, children, active, arrowPosition, trigger, ...others }, ref) => {
|
|
5143
5157
|
const { styled } = useTrilogyContext();
|
|
5144
5158
|
const classes = hashClass(
|
|
@@ -5151,7 +5165,7 @@ var Popover = React68.forwardRef(
|
|
|
5151
5165
|
className
|
|
5152
5166
|
)
|
|
5153
5167
|
);
|
|
5154
|
-
return /* @__PURE__ */
|
|
5168
|
+
return /* @__PURE__ */ React70.createElement("span", { ref, id, className: classes, ...others }, trigger && trigger, /* @__PURE__ */ React70.createElement("span", { className: hashClass(styled, "popover-content") }, children));
|
|
5155
5169
|
}
|
|
5156
5170
|
);
|
|
5157
5171
|
Popover.displayName = "Popover" /* Popover */;
|
|
@@ -5172,7 +5186,7 @@ var PopoverArrowPosition = /* @__PURE__ */ ((PopoverArrowPosition2) => {
|
|
|
5172
5186
|
|
|
5173
5187
|
// components/price/Price.tsx
|
|
5174
5188
|
var import_clsx60 = __toESM(require("clsx"));
|
|
5175
|
-
var
|
|
5189
|
+
var React71 = __toESM(require("react"));
|
|
5176
5190
|
|
|
5177
5191
|
// components/price/PriceHelpers.ts
|
|
5178
5192
|
var checkCents = (text) => {
|
|
@@ -5184,7 +5198,7 @@ var checkCents = (text) => {
|
|
|
5184
5198
|
};
|
|
5185
5199
|
|
|
5186
5200
|
// components/price/Price.tsx
|
|
5187
|
-
var Price =
|
|
5201
|
+
var Price = React71.forwardRef(
|
|
5188
5202
|
({
|
|
5189
5203
|
className,
|
|
5190
5204
|
id,
|
|
@@ -5218,7 +5232,7 @@ var Price = React69.forwardRef(
|
|
|
5218
5232
|
let cents = checkCents(((_a = absoluteAmountStrike.toString().split(/[.,]/)[1]) == null ? void 0 : _a.substring(0, 2)) || "");
|
|
5219
5233
|
cents = cents && cents.length === 1 && `${cents}0` || cents;
|
|
5220
5234
|
const centsDisplayed = !hideCents && `\u20AC${cents}` || "\u20AC";
|
|
5221
|
-
oldAmountComponent = /* @__PURE__ */
|
|
5235
|
+
oldAmountComponent = /* @__PURE__ */ React71.createElement("span", { "aria-hidden": "true", className: classesStrike, ...others }, /* @__PURE__ */ React71.createElement(Text_default, { markup: "span" /* SPAN */ }, `${wholeStrike}`), /* @__PURE__ */ React71.createElement("span", { className: hashClass(styled, (0, import_clsx60.default)("price-details")) }, /* @__PURE__ */ React71.createElement("span", { className: hashClass(styled, (0, import_clsx60.default)("cents")) }, centsDisplayed === "\u20AC" ? /* @__PURE__ */ React71.createElement(React71.Fragment, null, "\xA0", centsDisplayed) : centsDisplayed, mention && /* @__PURE__ */ React71.createElement("sup", null, mention)), period && /* @__PURE__ */ React71.createElement("span", { className: hashClass(styled, (0, import_clsx60.default)("period")) }, "/", period)));
|
|
5222
5236
|
}
|
|
5223
5237
|
if (amount !== void 0) {
|
|
5224
5238
|
const isNegative = amount < 0;
|
|
@@ -5229,9 +5243,9 @@ var Price = React69.forwardRef(
|
|
|
5229
5243
|
cents = cents && cents.length === 1 && `${cents}0` || cents;
|
|
5230
5244
|
const centsDisplayed = !hideCents && `\u20AC${cents}` || "\u20AC";
|
|
5231
5245
|
const dataPrice = `${whole}${!hideCents && cents ? `.${cents}` : ""}`;
|
|
5232
|
-
amountComponent = /* @__PURE__ */
|
|
5246
|
+
amountComponent = /* @__PURE__ */ React71.createElement("span", { "aria-hidden": "true", "aria-label": accessibilityLabel, className: classes, "data-price": dataPrice, ...others }, /* @__PURE__ */ React71.createElement(Text_default, { markup: "span" /* SPAN */ }, `${whole}`), /* @__PURE__ */ React71.createElement("span", { className: hashClass(styled, (0, import_clsx60.default)("price-details")) }, /* @__PURE__ */ React71.createElement("span", { className: hashClass(styled, (0, import_clsx60.default)("cents")) }, centsDisplayed === "\u20AC" ? /* @__PURE__ */ React71.createElement(React71.Fragment, null, "\xA0", centsDisplayed) : centsDisplayed, mention && /* @__PURE__ */ React71.createElement("sup", null, mention)), period && /* @__PURE__ */ React71.createElement("span", { className: hashClass(styled, (0, import_clsx60.default)("period")) }, "/", period)));
|
|
5233
5247
|
}
|
|
5234
|
-
return /* @__PURE__ */
|
|
5248
|
+
return /* @__PURE__ */ React71.createElement(
|
|
5235
5249
|
"div",
|
|
5236
5250
|
{
|
|
5237
5251
|
ref,
|
|
@@ -5245,11 +5259,11 @@ var Price = React69.forwardRef(
|
|
|
5245
5259
|
)
|
|
5246
5260
|
)
|
|
5247
5261
|
},
|
|
5248
|
-
overline && /* @__PURE__ */
|
|
5262
|
+
overline && /* @__PURE__ */ React71.createElement("p", { className: hashClass(styled, (0, import_clsx60.default)("overline")) }, overline),
|
|
5249
5263
|
oldAmountComponent,
|
|
5250
5264
|
amountComponent,
|
|
5251
5265
|
tagAmountComponent,
|
|
5252
|
-
accessibilityLabel && /* @__PURE__ */
|
|
5266
|
+
accessibilityLabel && /* @__PURE__ */ React71.createElement("p", { className: hashClass(styled, (0, import_clsx60.default)("sr-only")) }, accessibilityLabel)
|
|
5253
5267
|
);
|
|
5254
5268
|
}
|
|
5255
5269
|
);
|
|
@@ -5270,8 +5284,8 @@ var PriceLevel = /* @__PURE__ */ ((PriceLevel2) => {
|
|
|
5270
5284
|
|
|
5271
5285
|
// components/product-tour/ProductTour.tsx
|
|
5272
5286
|
var import_clsx61 = __toESM(require("clsx"));
|
|
5273
|
-
var
|
|
5274
|
-
var ProductTour =
|
|
5287
|
+
var import_react39 = __toESM(require("react"));
|
|
5288
|
+
var ProductTour = import_react39.default.forwardRef(({
|
|
5275
5289
|
children,
|
|
5276
5290
|
className,
|
|
5277
5291
|
id,
|
|
@@ -5283,16 +5297,16 @@ var ProductTour = import_react37.default.forwardRef(({
|
|
|
5283
5297
|
avatarDirection,
|
|
5284
5298
|
...others
|
|
5285
5299
|
}, ref) => {
|
|
5286
|
-
const [display, setDisplay] = (0,
|
|
5300
|
+
const [display, setDisplay] = (0, import_react39.useState)(active || false);
|
|
5287
5301
|
const { styled } = useTrilogyContext();
|
|
5288
|
-
(0,
|
|
5302
|
+
(0, import_react39.useEffect)(() => {
|
|
5289
5303
|
setDisplay(active || false);
|
|
5290
5304
|
}, [active]);
|
|
5291
5305
|
const classes = hashClass(
|
|
5292
5306
|
styled,
|
|
5293
5307
|
(0, import_clsx61.default)("product-tour", display && is("active"), avatarDirection && has(`icon-${avatarDirection}`), className)
|
|
5294
5308
|
);
|
|
5295
|
-
return /* @__PURE__ */
|
|
5309
|
+
return /* @__PURE__ */ import_react39.default.createElement("div", { ref, id, className: classes, ...others }, arrowDirection && /* @__PURE__ */ import_react39.default.createElement("div", { className: hashClass(styled, (0, import_clsx61.default)("arrow", is(arrowDirection), arrowAlign && is(arrowAlign))) }), avatarSrc && /* @__PURE__ */ import_react39.default.createElement("span", { className: hashClass(styled, (0, import_clsx61.default)("icon", is("medium"))) }, /* @__PURE__ */ import_react39.default.createElement("img", { className: hashClass(styled, (0, import_clsx61.default)(is("rounded"))), src: avatarSrc })), closeable && /* @__PURE__ */ import_react39.default.createElement("div", { style: { cursor: "pointer" }, onClick: () => setDisplay(!display) }, /* @__PURE__ */ import_react39.default.createElement(Icon_default, { size: "small" /* SMALL */, name: "tri-times" /* TIMES */, className: "close" })), /* @__PURE__ */ import_react39.default.createElement("div", { className: hashClass(styled, (0, import_clsx61.default)("product-tour-content")) }, children));
|
|
5296
5310
|
});
|
|
5297
5311
|
ProductTour.displayName = "ProductTour" /* ProductTour */;
|
|
5298
5312
|
var ProductTour_default = ProductTour;
|
|
@@ -5324,8 +5338,8 @@ var AvatarDirection = /* @__PURE__ */ ((AvatarDirection2) => {
|
|
|
5324
5338
|
|
|
5325
5339
|
// components/progress/Progress.tsx
|
|
5326
5340
|
var import_clsx62 = __toESM(require("clsx"));
|
|
5327
|
-
var
|
|
5328
|
-
var Progress =
|
|
5341
|
+
var React73 = __toESM(require("react"));
|
|
5342
|
+
var Progress = React73.forwardRef(({
|
|
5329
5343
|
children,
|
|
5330
5344
|
className,
|
|
5331
5345
|
id,
|
|
@@ -5352,24 +5366,24 @@ var Progress = React71.forwardRef(({
|
|
|
5352
5366
|
);
|
|
5353
5367
|
const stackedClasses = hashClass(styled, (0, import_clsx62.default)("progress", stacked && is("stacked"), className));
|
|
5354
5368
|
if (children && stacked) {
|
|
5355
|
-
return /* @__PURE__ */
|
|
5369
|
+
return /* @__PURE__ */ React73.createElement("div", { className: stackedClasses, ...others }, children);
|
|
5356
5370
|
}
|
|
5357
|
-
return /* @__PURE__ */
|
|
5371
|
+
return /* @__PURE__ */ React73.createElement("div", { ref, className: "progress-container" }, /* @__PURE__ */ React73.createElement("progress", { id, className: classes, value, max, ...others }, value), (legendStart || legendCenter || legendEnd) && /* @__PURE__ */ React73.createElement("div", { className: "progress-legends" }, legendStart && /* @__PURE__ */ React73.createElement("div", { className: "progress-legend-start" }, /* @__PURE__ */ React73.createElement(Text_default, null, legendStart)), legendCenter && /* @__PURE__ */ React73.createElement("div", { className: "progress-legend-center" }, /* @__PURE__ */ React73.createElement(Text_default, null, legendCenter)), legendEnd && /* @__PURE__ */ React73.createElement("div", { className: "progress-legend-end" }, /* @__PURE__ */ React73.createElement(Text_default, null, legendEnd))));
|
|
5358
5372
|
});
|
|
5359
5373
|
Progress.displayName = "Progress" /* Progress */;
|
|
5360
5374
|
var Progress_default = Progress;
|
|
5361
5375
|
|
|
5362
5376
|
// components/progress/item/ProgressItem.tsx
|
|
5363
5377
|
var import_clsx63 = __toESM(require("clsx"));
|
|
5364
|
-
var
|
|
5365
|
-
var ProgressItem =
|
|
5378
|
+
var import_react40 = __toESM(require("react"));
|
|
5379
|
+
var ProgressItem = import_react40.default.forwardRef(
|
|
5366
5380
|
({ className, percent, maxPercent = 100, minPercent = 0, status, accessibilityLabel, ...others }, ref) => {
|
|
5367
5381
|
const { styled } = useTrilogyContext();
|
|
5368
5382
|
const classes = hashClass(
|
|
5369
5383
|
styled,
|
|
5370
5384
|
(0, import_clsx63.default)("progress-bar", status && is(getStatusClassName(status)), !status && is("primary"), className)
|
|
5371
5385
|
);
|
|
5372
|
-
return /* @__PURE__ */
|
|
5386
|
+
return /* @__PURE__ */ import_react40.default.createElement(
|
|
5373
5387
|
"div",
|
|
5374
5388
|
{
|
|
5375
5389
|
ref,
|
|
@@ -5392,9 +5406,9 @@ var ProgressItem_default = ProgressItem;
|
|
|
5392
5406
|
var item_default3 = ProgressItem_default;
|
|
5393
5407
|
|
|
5394
5408
|
// components/progress/radial/ProgressRadial.tsx
|
|
5395
|
-
var
|
|
5409
|
+
var import_react41 = __toESM(require("react"));
|
|
5396
5410
|
var import_clsx64 = __toESM(require("clsx"));
|
|
5397
|
-
var ProgressRadial =
|
|
5411
|
+
var ProgressRadial = import_react41.default.forwardRef(({
|
|
5398
5412
|
children,
|
|
5399
5413
|
value = 0,
|
|
5400
5414
|
secondValue = 0,
|
|
@@ -5407,11 +5421,11 @@ var ProgressRadial = import_react39.default.forwardRef(({
|
|
|
5407
5421
|
...others
|
|
5408
5422
|
}, ref) => {
|
|
5409
5423
|
const { styled } = useTrilogyContext();
|
|
5410
|
-
const [firstProgressCurrentValue, setFirstProgressCurrentValue] = (0,
|
|
5411
|
-
const [secondProgressCurrentValue, setSecondProgressCurrentValue] = (0,
|
|
5424
|
+
const [firstProgressCurrentValue, setFirstProgressCurrentValue] = (0, import_react41.useState)(0);
|
|
5425
|
+
const [secondProgressCurrentValue, setSecondProgressCurrentValue] = (0, import_react41.useState)(0);
|
|
5412
5426
|
const classes = hashClass(styled, (0, import_clsx64.default)("progress-radial", skeleton && is("loading"), small && is("small"), className));
|
|
5413
5427
|
const classesContent = hashClass(styled, (0, import_clsx64.default)("progress-radial-content"));
|
|
5414
|
-
const progressRadialRef = (0,
|
|
5428
|
+
const progressRadialRef = (0, import_react41.useRef)(null);
|
|
5415
5429
|
const updateBackgroundStyle = (firstValue, secondValue2) => {
|
|
5416
5430
|
const progressRadial = progressRadialRef.current;
|
|
5417
5431
|
if (!progressRadial) {
|
|
@@ -5427,7 +5441,7 @@ var ProgressRadial = import_react39.default.forwardRef(({
|
|
|
5427
5441
|
)} ${secondProgressStartDegree}deg ${secondProgressStartDegree + secondProgressDegree}deg, ${getColorStyle("MAIN_FADE")} ${secondProgressStartDegree + secondProgressDegree}deg 360deg)`;
|
|
5428
5442
|
progressRadial.style.background = styleBackground;
|
|
5429
5443
|
};
|
|
5430
|
-
(0,
|
|
5444
|
+
(0, import_react41.useEffect)(() => {
|
|
5431
5445
|
let animationFrameId;
|
|
5432
5446
|
setFirstProgressCurrentValue(0);
|
|
5433
5447
|
setSecondProgressCurrentValue(0);
|
|
@@ -5444,10 +5458,10 @@ var ProgressRadial = import_react39.default.forwardRef(({
|
|
|
5444
5458
|
animationFrameId = requestAnimationFrame(frame);
|
|
5445
5459
|
return () => cancelAnimationFrame(animationFrameId);
|
|
5446
5460
|
}, [value, secondValue]);
|
|
5447
|
-
(0,
|
|
5461
|
+
(0, import_react41.useEffect)(() => {
|
|
5448
5462
|
updateBackgroundStyle(firstProgressCurrentValue, secondProgressCurrentValue);
|
|
5449
5463
|
}, [firstProgressCurrentValue, secondProgressCurrentValue]);
|
|
5450
|
-
return /* @__PURE__ */
|
|
5464
|
+
return /* @__PURE__ */ import_react41.default.createElement("div", { id, ...others, className: classes, ref: progressRadialRef }, /* @__PURE__ */ import_react41.default.createElement("div", { ref, className: classesContent }, label && /* @__PURE__ */ import_react41.default.createElement(Title_default, { level: 2 /* TWO */, marginless: true }, label), description && /* @__PURE__ */ import_react41.default.createElement(Text_default, { level: 1 /* ONE */, marginless: true }, description), !label && !description && children));
|
|
5451
5465
|
});
|
|
5452
5466
|
ProgressRadial.displayName = "ProgressRadial" /* ProgressRadial */;
|
|
5453
5467
|
var ProgressRadial_default = ProgressRadial;
|
|
@@ -5457,22 +5471,22 @@ var radial_default = ProgressRadial_default;
|
|
|
5457
5471
|
|
|
5458
5472
|
// components/progress/radial/item/ProgressRadialtem.tsx
|
|
5459
5473
|
var import_clsx65 = __toESM(require("clsx"));
|
|
5460
|
-
var
|
|
5474
|
+
var React76 = __toESM(require("react"));
|
|
5461
5475
|
var ProgressRadialItem = ({ color, className, id }) => {
|
|
5462
5476
|
const { styled } = useTrilogyContext();
|
|
5463
5477
|
const classes = hashClass(styled, (0, import_clsx65.default)(`progress-circle-slice progress-circle-background-${color}`, className));
|
|
5464
|
-
return /* @__PURE__ */
|
|
5478
|
+
return /* @__PURE__ */ React76.createElement("div", { id, className: classes });
|
|
5465
5479
|
};
|
|
5466
5480
|
var ProgressRadialtem_default = ProgressRadialItem;
|
|
5467
5481
|
|
|
5468
5482
|
// components/radio/list/RadioList.tsx
|
|
5469
5483
|
var import_clsx66 = __toESM(require("clsx"));
|
|
5470
|
-
var
|
|
5471
|
-
var RadioList =
|
|
5484
|
+
var React77 = __toESM(require("react"));
|
|
5485
|
+
var RadioList = React77.forwardRef(
|
|
5472
5486
|
({ className, id, align, horizontalMobile, verticalDesktop, accessibilityLabelledBy, children, label, ...others }, ref) => {
|
|
5473
5487
|
const { styled } = useTrilogyContext();
|
|
5474
5488
|
const groupLabelClasses = hashClass(styled, "group-label");
|
|
5475
|
-
return /* @__PURE__ */
|
|
5489
|
+
return /* @__PURE__ */ React77.createElement(React77.Fragment, null, label && /* @__PURE__ */ React77.createElement("p", { className: groupLabelClasses }, label, isRequiredChild(children) && /* @__PURE__ */ React77.createElement(Text_default, { markup: "span" /* SPAN */, typo: "has-text-error" /* TEXT_ERROR */ }, " ", "*")), /* @__PURE__ */ React77.createElement(
|
|
5476
5490
|
"div",
|
|
5477
5491
|
{
|
|
5478
5492
|
ref,
|
|
@@ -5501,13 +5515,13 @@ var RadioList_default = RadioList;
|
|
|
5501
5515
|
|
|
5502
5516
|
// components/radio/Radio.tsx
|
|
5503
5517
|
var import_clsx67 = __toESM(require("clsx"));
|
|
5504
|
-
var
|
|
5505
|
-
var Radio =
|
|
5518
|
+
var import_react42 = __toESM(require("react"));
|
|
5519
|
+
var Radio = import_react42.default.forwardRef(({
|
|
5506
5520
|
checked,
|
|
5507
5521
|
className,
|
|
5508
5522
|
disabled,
|
|
5509
5523
|
readonly,
|
|
5510
|
-
id =
|
|
5524
|
+
id = import_react42.default.useId(),
|
|
5511
5525
|
label,
|
|
5512
5526
|
onChange,
|
|
5513
5527
|
name,
|
|
@@ -5516,7 +5530,7 @@ var Radio = import_react40.default.forwardRef(({
|
|
|
5516
5530
|
...others
|
|
5517
5531
|
}, ref) => {
|
|
5518
5532
|
const { styled } = useTrilogyContext();
|
|
5519
|
-
return /* @__PURE__ */
|
|
5533
|
+
return /* @__PURE__ */ import_react42.default.createElement("div", { ref, className: hashClass(styled, (0, import_clsx67.default)("radio", className)) }, /* @__PURE__ */ import_react42.default.createElement(
|
|
5520
5534
|
"input",
|
|
5521
5535
|
{
|
|
5522
5536
|
type: "radio",
|
|
@@ -5539,15 +5553,15 @@ var Radio = import_react40.default.forwardRef(({
|
|
|
5539
5553
|
},
|
|
5540
5554
|
...others
|
|
5541
5555
|
}
|
|
5542
|
-
), /* @__PURE__ */
|
|
5556
|
+
), /* @__PURE__ */ import_react42.default.createElement("label", { htmlFor: id, className: hashClass(styled, (0, import_clsx67.default)("radio-label")) }, label));
|
|
5543
5557
|
});
|
|
5544
5558
|
Radio.displayName = "Radio" /* Radio */;
|
|
5545
5559
|
var Radio_default = Radio;
|
|
5546
5560
|
|
|
5547
5561
|
// components/radio/tiles/RadioTiles.tsx
|
|
5548
5562
|
var import_clsx68 = __toESM(require("clsx"));
|
|
5549
|
-
var
|
|
5550
|
-
var RadioTiles =
|
|
5563
|
+
var React79 = __toESM(require("react"));
|
|
5564
|
+
var RadioTiles = React79.forwardRef(({ id, className, children, align, verticalAlign, accessibilityLabelledBy, ...others }, ref) => {
|
|
5551
5565
|
const { styled } = useTrilogyContext();
|
|
5552
5566
|
let alignClass = null;
|
|
5553
5567
|
if (align) {
|
|
@@ -5557,7 +5571,7 @@ var RadioTiles = React77.forwardRef(({ id, className, children, align, verticalA
|
|
|
5557
5571
|
if (verticalAlign) {
|
|
5558
5572
|
verticalAlignClass = getAlignClassName(verticalAlign) === "aligned-start" && is("aligned-start") || getAlignClassName(verticalAlign) === "aligned-center" && is("aligned-center") || getAlignClassName(verticalAlign) === "aligned-end" && is("aligned-end") || getAlignClassName(verticalAlign) === "aligned-stretch" && is("aligned-stretch") || null;
|
|
5559
5573
|
}
|
|
5560
|
-
return /* @__PURE__ */
|
|
5574
|
+
return /* @__PURE__ */ React79.createElement(
|
|
5561
5575
|
"div",
|
|
5562
5576
|
{
|
|
5563
5577
|
ref,
|
|
@@ -5579,13 +5593,13 @@ var RadioTiles_default = RadioTiles;
|
|
|
5579
5593
|
|
|
5580
5594
|
// components/radio/tiles/tile/RadioTile.tsx
|
|
5581
5595
|
var import_clsx69 = __toESM(require("clsx"));
|
|
5582
|
-
var
|
|
5583
|
-
var RadioTile =
|
|
5596
|
+
var import_react43 = __toESM(require("react"));
|
|
5597
|
+
var RadioTile = import_react43.default.forwardRef(({
|
|
5584
5598
|
checked,
|
|
5585
5599
|
className,
|
|
5586
5600
|
disabled,
|
|
5587
5601
|
readonly,
|
|
5588
|
-
id =
|
|
5602
|
+
id = import_react43.default.useId(),
|
|
5589
5603
|
label,
|
|
5590
5604
|
onChange,
|
|
5591
5605
|
name,
|
|
@@ -5599,7 +5613,7 @@ var RadioTile = import_react41.default.forwardRef(({
|
|
|
5599
5613
|
...others
|
|
5600
5614
|
}, ref) => {
|
|
5601
5615
|
const { styled } = useTrilogyContext();
|
|
5602
|
-
return /* @__PURE__ */
|
|
5616
|
+
return /* @__PURE__ */ import_react43.default.createElement("div", { ref, className: hashClass(styled, (0, import_clsx69.default)("radio-tile", horizontal && is("horizontal"), className)) }, /* @__PURE__ */ import_react43.default.createElement(
|
|
5603
5617
|
"input",
|
|
5604
5618
|
{
|
|
5605
5619
|
type: "radio",
|
|
@@ -5622,18 +5636,18 @@ var RadioTile = import_react41.default.forwardRef(({
|
|
|
5622
5636
|
},
|
|
5623
5637
|
...others
|
|
5624
5638
|
}
|
|
5625
|
-
), /* @__PURE__ */
|
|
5639
|
+
), /* @__PURE__ */ import_react43.default.createElement("label", { htmlFor: id, className: hashClass(styled, (0, import_clsx69.default)("radio-label")) }, icon && /* @__PURE__ */ import_react43.default.createElement(Icon_default, { name: icon, size: "medium" /* MEDIUM */ }), horizontal ? /* @__PURE__ */ import_react43.default.createElement("span", null, /* @__PURE__ */ import_react43.default.createElement("span", { className: hashClass(styled, (0, import_clsx69.default)("radio-title")) }, label), description && /* @__PURE__ */ import_react43.default.createElement("span", { className: hashClass(styled, (0, import_clsx69.default)("radio-description")) }, description)) : /* @__PURE__ */ import_react43.default.createElement(import_react43.default.Fragment, null, /* @__PURE__ */ import_react43.default.createElement("span", { className: hashClass(styled, (0, import_clsx69.default)("radio-title")) }, label), description && /* @__PURE__ */ import_react43.default.createElement("span", { className: hashClass(styled, (0, import_clsx69.default)("radio-description")) }, description))), sticker && /* @__PURE__ */ import_react43.default.createElement(Sticker_default, { label: sticker, variant: stickerVariant, className: "radio-sticker", small: true }));
|
|
5626
5640
|
});
|
|
5627
5641
|
RadioTile.displayName = "RadioTile" /* RadioTile */;
|
|
5628
5642
|
var RadioTile_default = RadioTile;
|
|
5629
5643
|
|
|
5630
5644
|
// components/range/Range.tsx
|
|
5631
5645
|
var import_clsx70 = __toESM(require("clsx"));
|
|
5632
|
-
var
|
|
5633
|
-
var Range =
|
|
5646
|
+
var React81 = __toESM(require("react"));
|
|
5647
|
+
var Range = React81.forwardRef(
|
|
5634
5648
|
({
|
|
5635
5649
|
className,
|
|
5636
|
-
id =
|
|
5650
|
+
id = React81.useId(),
|
|
5637
5651
|
min,
|
|
5638
5652
|
max,
|
|
5639
5653
|
label,
|
|
@@ -5649,37 +5663,37 @@ var Range = React79.forwardRef(
|
|
|
5649
5663
|
value
|
|
5650
5664
|
}, ref) => {
|
|
5651
5665
|
const { styled } = useTrilogyContext();
|
|
5652
|
-
const refTrack =
|
|
5653
|
-
const [cursorMin, setCursorMin] =
|
|
5654
|
-
const [cursorMax, setCursorMax] =
|
|
5655
|
-
|
|
5666
|
+
const refTrack = React81.useRef(null);
|
|
5667
|
+
const [cursorMin, setCursorMin] = React81.useState(valueMin != null ? valueMin : 0);
|
|
5668
|
+
const [cursorMax, setCursorMax] = React81.useState(simple ? value || 0 : valueMax != null ? valueMax : max);
|
|
5669
|
+
React81.useEffect(() => {
|
|
5656
5670
|
if (refTrack.current) {
|
|
5657
5671
|
const track = refTrack.current;
|
|
5658
5672
|
track.style.background = `linear-gradient(to right, ${getColorStyle("MAIN_FADE" /* MAIN_FADE */)} ${cursorMin / max * 100}% , ${getColorStyle("MAIN" /* MAIN */)} ${cursorMin / max * 100}% , ${getColorStyle("MAIN" /* MAIN */)} ${cursorMax / max * 100}%, ${getColorStyle("MAIN_FADE" /* MAIN_FADE */)} ${cursorMax / max * 100}%) `;
|
|
5659
5673
|
}
|
|
5660
5674
|
}, [cursorMin, cursorMax]);
|
|
5661
|
-
|
|
5675
|
+
React81.useEffect(() => {
|
|
5662
5676
|
setCursorMin(valueMin || 0);
|
|
5663
5677
|
}, [valueMin]);
|
|
5664
|
-
|
|
5678
|
+
React81.useEffect(() => {
|
|
5665
5679
|
if (!simple) setCursorMax(valueMax || max);
|
|
5666
5680
|
}, [valueMax, simple]);
|
|
5667
|
-
|
|
5681
|
+
React81.useEffect(() => {
|
|
5668
5682
|
if (simple && value !== void 0) setCursorMax(value);
|
|
5669
5683
|
}, [value, simple]);
|
|
5670
|
-
const handleChangeCursorMin =
|
|
5684
|
+
const handleChangeCursorMin = React81.useCallback(
|
|
5671
5685
|
(e) => {
|
|
5672
5686
|
if (Number(e.target.value) < cursorMax - gap) setCursorMin(Number(e.target.value));
|
|
5673
5687
|
},
|
|
5674
5688
|
[cursorMax, cursorMin]
|
|
5675
5689
|
);
|
|
5676
|
-
const handleChangeCursorMax =
|
|
5690
|
+
const handleChangeCursorMax = React81.useCallback(
|
|
5677
5691
|
(e) => {
|
|
5678
5692
|
if (Number(e.target.value) >= cursorMin + gap) setCursorMax(Number(e.target.value));
|
|
5679
5693
|
},
|
|
5680
5694
|
[cursorMax, cursorMin]
|
|
5681
5695
|
);
|
|
5682
|
-
const handleMouseUpMin =
|
|
5696
|
+
const handleMouseUpMin = React81.useCallback(() => {
|
|
5683
5697
|
if (onChangeMin) {
|
|
5684
5698
|
onChangeMin({
|
|
5685
5699
|
inputName: name,
|
|
@@ -5687,7 +5701,7 @@ var Range = React79.forwardRef(
|
|
|
5687
5701
|
});
|
|
5688
5702
|
}
|
|
5689
5703
|
}, [onChangeMin, name, cursorMin]);
|
|
5690
|
-
const handleMouseUpMax =
|
|
5704
|
+
const handleMouseUpMax = React81.useCallback(() => {
|
|
5691
5705
|
if (onChangeMax && !simple) {
|
|
5692
5706
|
onChangeMax({
|
|
5693
5707
|
inputName: name,
|
|
@@ -5701,7 +5715,7 @@ var Range = React79.forwardRef(
|
|
|
5701
5715
|
});
|
|
5702
5716
|
}
|
|
5703
5717
|
}, [onChangeMax, name, cursorMax, onChange, simple]);
|
|
5704
|
-
return /* @__PURE__ */
|
|
5718
|
+
return /* @__PURE__ */ React81.createElement("div", { ref, id, className: hashClass(styled, (0, import_clsx70.default)("range-container", className)) }, /* @__PURE__ */ React81.createElement("label", { className: hashClass(styled, (0, import_clsx70.default)("range-label")) }, label), /* @__PURE__ */ React81.createElement("div", { className: hashClass(styled, (0, import_clsx70.default)("range")) }, /* @__PURE__ */ React81.createElement("div", { ref: refTrack, className: hashClass(styled, (0, import_clsx70.default)("range-track")) }), !simple && /* @__PURE__ */ React81.createElement(
|
|
5705
5719
|
"input",
|
|
5706
5720
|
{
|
|
5707
5721
|
className: hashClass(styled, (0, import_clsx70.default)("range-cursor range-cursor-min")),
|
|
@@ -5716,7 +5730,7 @@ var Range = React79.forwardRef(
|
|
|
5716
5730
|
id: `${id}-min`,
|
|
5717
5731
|
"aria-label": label
|
|
5718
5732
|
}
|
|
5719
|
-
), /* @__PURE__ */
|
|
5733
|
+
), /* @__PURE__ */ React81.createElement(
|
|
5720
5734
|
"input",
|
|
5721
5735
|
{
|
|
5722
5736
|
className: hashClass(styled, (0, import_clsx70.default)("range-cursor", !simple && "range-cursor-max")),
|
|
@@ -5731,7 +5745,7 @@ var Range = React79.forwardRef(
|
|
|
5731
5745
|
id: `${id}-max`,
|
|
5732
5746
|
"aria-label": label
|
|
5733
5747
|
}
|
|
5734
|
-
)), /* @__PURE__ */
|
|
5748
|
+
)), /* @__PURE__ */ React81.createElement("div", { className: hashClass(styled, (0, import_clsx70.default)("range-values")) }, !simple && /* @__PURE__ */ React81.createElement("div", null, /* @__PURE__ */ React81.createElement("span", { className: hashClass(styled, (0, import_clsx70.default)("range-value-min")) }, cursorMin), unit && /* @__PURE__ */ React81.createElement("span", null, " ", unit)), /* @__PURE__ */ React81.createElement("div", null, /* @__PURE__ */ React81.createElement("span", { className: hashClass(styled, (0, import_clsx70.default)(simple ? "range-value" : "range-value-max")) }, cursorMax), unit && /* @__PURE__ */ React81.createElement("span", null, " ", unit))));
|
|
5735
5749
|
}
|
|
5736
5750
|
);
|
|
5737
5751
|
Range.displayName = "Range" /* Range */;
|
|
@@ -5739,10 +5753,10 @@ var Range_default = Range;
|
|
|
5739
5753
|
|
|
5740
5754
|
// components/rows/Rows.tsx
|
|
5741
5755
|
var import_clsx71 = __toESM(require("clsx"));
|
|
5742
|
-
var
|
|
5743
|
-
var Rows =
|
|
5756
|
+
var React82 = __toESM(require("react"));
|
|
5757
|
+
var Rows = React82.forwardRef(({ className, id, gap, ...others }, ref) => {
|
|
5744
5758
|
const { styled } = useTrilogyContext();
|
|
5745
|
-
return /* @__PURE__ */
|
|
5759
|
+
return /* @__PURE__ */ React82.createElement(
|
|
5746
5760
|
"div",
|
|
5747
5761
|
{
|
|
5748
5762
|
ref,
|
|
@@ -5760,11 +5774,11 @@ var Rows_default = Rows;
|
|
|
5760
5774
|
|
|
5761
5775
|
// components/rows/row/Row.tsx
|
|
5762
5776
|
var import_clsx72 = __toESM(require("clsx"));
|
|
5763
|
-
var
|
|
5764
|
-
var Row =
|
|
5777
|
+
var React83 = __toESM(require("react"));
|
|
5778
|
+
var Row = React83.forwardRef(({ className, id, narrow, ...others }, ref) => {
|
|
5765
5779
|
const { styled } = useTrilogyContext();
|
|
5766
5780
|
const classes = hashClass(styled, (0, import_clsx72.default)("row", narrow && is("narrow"), className));
|
|
5767
|
-
return /* @__PURE__ */
|
|
5781
|
+
return /* @__PURE__ */ React83.createElement("div", { ref, id, className: classes, ...others });
|
|
5768
5782
|
});
|
|
5769
5783
|
Row.displayName = "Row" /* Row */;
|
|
5770
5784
|
var Row_default = Row;
|
|
@@ -5774,8 +5788,8 @@ var row_default = Row_default;
|
|
|
5774
5788
|
|
|
5775
5789
|
// components/scroll-view/ScrollView.tsx
|
|
5776
5790
|
var import_clsx73 = __toESM(require("clsx"));
|
|
5777
|
-
var
|
|
5778
|
-
var ScrollView =
|
|
5791
|
+
var React84 = __toESM(require("react"));
|
|
5792
|
+
var ScrollView = React84.forwardRef(
|
|
5779
5793
|
({ id, scrollDirection, children }, ref) => {
|
|
5780
5794
|
const { styled } = useTrilogyContext();
|
|
5781
5795
|
const scrollDirectionClassName = () => {
|
|
@@ -5793,7 +5807,7 @@ var ScrollView = React82.forwardRef(
|
|
|
5793
5807
|
styled,
|
|
5794
5808
|
(0, import_clsx73.default)("scroll-view", scrollDirection && scrollDirectionClassName())
|
|
5795
5809
|
);
|
|
5796
|
-
return /* @__PURE__ */
|
|
5810
|
+
return /* @__PURE__ */ React84.createElement("div", { ref, className: classes, id }, children);
|
|
5797
5811
|
}
|
|
5798
5812
|
);
|
|
5799
5813
|
ScrollView.displayName = "ScrollView" /* ScrollView */;
|
|
@@ -5801,8 +5815,8 @@ var ScrollView_default = ScrollView;
|
|
|
5801
5815
|
|
|
5802
5816
|
// components/section/Section.tsx
|
|
5803
5817
|
var import_clsx74 = __toESM(require("clsx"));
|
|
5804
|
-
var
|
|
5805
|
-
var Section =
|
|
5818
|
+
var import_react44 = __toESM(require("react"));
|
|
5819
|
+
var Section = import_react44.default.forwardRef(({ className, id, skeleton, backgroundColor, backgroundSrc, inverted, ...others }, ref) => {
|
|
5806
5820
|
const { styled } = useTrilogyContext();
|
|
5807
5821
|
const _className = hashClass(
|
|
5808
5822
|
styled,
|
|
@@ -5815,7 +5829,7 @@ var Section = import_react42.default.forwardRef(({ className, id, skeleton, back
|
|
|
5815
5829
|
skeleton && is("loading")
|
|
5816
5830
|
)
|
|
5817
5831
|
);
|
|
5818
|
-
return /* @__PURE__ */
|
|
5832
|
+
return /* @__PURE__ */ import_react44.default.createElement(
|
|
5819
5833
|
"section",
|
|
5820
5834
|
{
|
|
5821
5835
|
ref,
|
|
@@ -5833,19 +5847,19 @@ var Section_default = Section;
|
|
|
5833
5847
|
|
|
5834
5848
|
// components/segment-control/SegmentControl.tsx
|
|
5835
5849
|
var import_clsx76 = __toESM(require("clsx"));
|
|
5836
|
-
var
|
|
5850
|
+
var import_react46 = __toESM(require("react"));
|
|
5837
5851
|
|
|
5838
5852
|
// components/segment-control/item/SegmentControlItem.tsx
|
|
5839
5853
|
var import_clsx75 = __toESM(require("clsx"));
|
|
5840
|
-
var
|
|
5841
|
-
var SegmentControlItem =
|
|
5854
|
+
var import_react45 = __toESM(require("react"));
|
|
5855
|
+
var SegmentControlItem = import_react45.default.forwardRef(
|
|
5842
5856
|
({ active, onClick, disabled, className, id, children, ...others }, ref) => {
|
|
5843
|
-
const [activeItem, setActiveItem] = (0,
|
|
5857
|
+
const [activeItem, setActiveItem] = (0, import_react45.useState)(active || false);
|
|
5844
5858
|
const { styled } = useTrilogyContext();
|
|
5845
|
-
(0,
|
|
5859
|
+
(0, import_react45.useEffect)(() => {
|
|
5846
5860
|
setActiveItem(active || false);
|
|
5847
5861
|
}, [active]);
|
|
5848
|
-
return /* @__PURE__ */
|
|
5862
|
+
return /* @__PURE__ */ import_react45.default.createElement(
|
|
5849
5863
|
"button",
|
|
5850
5864
|
{
|
|
5851
5865
|
type: "button",
|
|
@@ -5874,10 +5888,10 @@ var SegmentControlItem_default = SegmentControlItem;
|
|
|
5874
5888
|
var item_default4 = SegmentControlItem_default;
|
|
5875
5889
|
|
|
5876
5890
|
// components/segment-control/SegmentControl.tsx
|
|
5877
|
-
var SegmentControl =
|
|
5891
|
+
var SegmentControl = import_react46.default.forwardRef(({ className, id, onClick, children, activeIndex, align, ...others }, ref) => {
|
|
5878
5892
|
const { styled } = useTrilogyContext();
|
|
5879
5893
|
const classes = hashClass(styled, (0, import_clsx76.default)("segmented-control", align && getJustifiedClassName(align), className));
|
|
5880
|
-
const [activateIndex, setActivateIndex] = (0,
|
|
5894
|
+
const [activateIndex, setActivateIndex] = (0, import_react46.useState)(activeIndex || 0);
|
|
5881
5895
|
const isActive = (index, childPropsActive) => {
|
|
5882
5896
|
if (typeof childPropsActive !== "undefined" && !activateIndex) {
|
|
5883
5897
|
return childPropsActive;
|
|
@@ -5890,10 +5904,10 @@ var SegmentControl = import_react44.default.forwardRef(({ className, id, onClick
|
|
|
5890
5904
|
setActivateIndex(index);
|
|
5891
5905
|
if (onClick) onClick(e);
|
|
5892
5906
|
};
|
|
5893
|
-
|
|
5907
|
+
import_react46.default.useEffect(() => {
|
|
5894
5908
|
setActivateIndex(activateIndex);
|
|
5895
5909
|
}, [activateIndex]);
|
|
5896
|
-
return /* @__PURE__ */
|
|
5910
|
+
return /* @__PURE__ */ import_react46.default.createElement("div", { ref, id, className: classes, ...others }, children && Array.isArray(children) && // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5897
5911
|
children.map((child, index) => {
|
|
5898
5912
|
const props = {
|
|
5899
5913
|
active: Boolean(isActive(index, child.props.active)) || false,
|
|
@@ -5908,7 +5922,7 @@ var SegmentControl = import_react44.default.forwardRef(({ className, id, onClick
|
|
|
5908
5922
|
}
|
|
5909
5923
|
}
|
|
5910
5924
|
};
|
|
5911
|
-
return child && typeof child.valueOf() === "string" ? /* @__PURE__ */
|
|
5925
|
+
return child && typeof child.valueOf() === "string" ? /* @__PURE__ */ import_react46.default.createElement(
|
|
5912
5926
|
item_default4,
|
|
5913
5927
|
{
|
|
5914
5928
|
disabled: props.disabled,
|
|
@@ -5917,101 +5931,23 @@ var SegmentControl = import_react44.default.forwardRef(({ className, id, onClick
|
|
|
5917
5931
|
onClick: (e) => onClick == null ? void 0 : onClick(e)
|
|
5918
5932
|
},
|
|
5919
5933
|
child
|
|
5920
|
-
) :
|
|
5934
|
+
) : import_react46.default.cloneElement(child, props);
|
|
5921
5935
|
}));
|
|
5922
5936
|
});
|
|
5923
5937
|
SegmentControl.displayName = "SegmentControl" /* SegmentControl */;
|
|
5924
5938
|
var SegmentControl_default = SegmentControl;
|
|
5925
5939
|
|
|
5926
|
-
// components/skeleton/Skeleton.
|
|
5927
|
-
var
|
|
5928
|
-
var
|
|
5929
|
-
|
|
5930
|
-
style,
|
|
5931
|
-
width = "100%",
|
|
5932
|
-
height = 20,
|
|
5933
|
-
backgroundColor = "#E1E9EE",
|
|
5934
|
-
shimmerColor = "#F7F8F8",
|
|
5935
|
-
duration = 1200,
|
|
5936
|
-
borderRadius = 4,
|
|
5937
|
-
children,
|
|
5938
|
-
testID
|
|
5939
|
-
}) => {
|
|
5940
|
-
const shimmerValue = (0, import_react45.useRef)(new import_react_native.Animated.Value(0)).current;
|
|
5941
|
-
const [containerWidth, setContainerWidth] = import_react45.default.useState(200);
|
|
5942
|
-
(0, import_react45.useEffect)(() => {
|
|
5943
|
-
const shimmerAnimation = import_react_native.Animated.loop(
|
|
5944
|
-
import_react_native.Animated.timing(shimmerValue, {
|
|
5945
|
-
toValue: 1,
|
|
5946
|
-
duration,
|
|
5947
|
-
useNativeDriver: true
|
|
5948
|
-
}),
|
|
5949
|
-
{ iterations: -1 }
|
|
5950
|
-
);
|
|
5951
|
-
shimmerAnimation.start();
|
|
5952
|
-
return () => shimmerAnimation.stop();
|
|
5953
|
-
}, [shimmerValue, duration]);
|
|
5954
|
-
const translateX = shimmerValue.interpolate({
|
|
5955
|
-
inputRange: [0, 1],
|
|
5956
|
-
outputRange: [-containerWidth, containerWidth]
|
|
5957
|
-
});
|
|
5958
|
-
const opacity = shimmerValue.interpolate({
|
|
5959
|
-
inputRange: [0, 0.5, 1],
|
|
5960
|
-
outputRange: [0.3, 0.8, 0.3]
|
|
5961
|
-
});
|
|
5962
|
-
const containerStyle = {
|
|
5963
|
-
width: children ? void 0 : width,
|
|
5964
|
-
height: children ? void 0 : height,
|
|
5965
|
-
backgroundColor,
|
|
5966
|
-
borderRadius,
|
|
5967
|
-
overflow: "hidden",
|
|
5968
|
-
alignSelf: children ? "flex-start" : void 0,
|
|
5969
|
-
...style
|
|
5970
|
-
};
|
|
5971
|
-
const handleLayout = (event) => {
|
|
5972
|
-
const { width: layoutWidth } = event.nativeEvent.layout;
|
|
5973
|
-
setContainerWidth(layoutWidth);
|
|
5974
|
-
};
|
|
5975
|
-
if (children) {
|
|
5976
|
-
return /* @__PURE__ */ import_react45.default.createElement(import_react_native.View, { style: containerStyle, testID, onLayout: handleLayout }, /* @__PURE__ */ import_react45.default.createElement(import_react_native.View, { style: { opacity: 0 } }, children), /* @__PURE__ */ import_react45.default.createElement(
|
|
5977
|
-
import_react_native.Animated.View,
|
|
5978
|
-
{
|
|
5979
|
-
style: [
|
|
5980
|
-
{
|
|
5981
|
-
position: "absolute",
|
|
5982
|
-
top: 0,
|
|
5983
|
-
left: 0,
|
|
5984
|
-
width: containerWidth * 0.7,
|
|
5985
|
-
height: "100%",
|
|
5986
|
-
backgroundColor: shimmerColor,
|
|
5987
|
-
opacity,
|
|
5988
|
-
transform: [{ translateX }]
|
|
5989
|
-
}
|
|
5990
|
-
]
|
|
5991
|
-
}
|
|
5992
|
-
));
|
|
5993
|
-
}
|
|
5994
|
-
return /* @__PURE__ */ import_react45.default.createElement(import_react_native.View, { style: containerStyle, testID, onLayout: handleLayout }, /* @__PURE__ */ import_react45.default.createElement(
|
|
5995
|
-
import_react_native.Animated.View,
|
|
5996
|
-
{
|
|
5997
|
-
style: [
|
|
5998
|
-
{
|
|
5999
|
-
width: containerWidth * 0.7,
|
|
6000
|
-
height: "100%",
|
|
6001
|
-
backgroundColor: shimmerColor,
|
|
6002
|
-
opacity,
|
|
6003
|
-
transform: [{ translateX }]
|
|
6004
|
-
}
|
|
6005
|
-
]
|
|
6006
|
-
}
|
|
6007
|
-
));
|
|
5940
|
+
// components/skeleton/Skeleton.tsx
|
|
5941
|
+
var import_react47 = __toESM(require("react"));
|
|
5942
|
+
var Skeleton = () => {
|
|
5943
|
+
return /* @__PURE__ */ import_react47.default.createElement("div", null);
|
|
6008
5944
|
};
|
|
6009
|
-
var
|
|
5945
|
+
var Skeleton_default = Skeleton;
|
|
6010
5946
|
|
|
6011
5947
|
// components/spacer/Spacer.tsx
|
|
6012
5948
|
var import_clsx77 = __toESM(require("clsx"));
|
|
6013
|
-
var
|
|
6014
|
-
var Spacer =
|
|
5949
|
+
var React89 = __toESM(require("react"));
|
|
5950
|
+
var Spacer = React89.forwardRef(({ size: size2, horizontal, className, id }, ref) => {
|
|
6015
5951
|
const { styled } = useTrilogyContext();
|
|
6016
5952
|
const styles = {
|
|
6017
5953
|
spacer: {
|
|
@@ -6020,24 +5956,24 @@ var Spacer = React87.forwardRef(({ size: size2, horizontal, className, id }, ref
|
|
|
6020
5956
|
}
|
|
6021
5957
|
};
|
|
6022
5958
|
const classes = hashClass(styled, (0, import_clsx77.default)(className));
|
|
6023
|
-
return /* @__PURE__ */
|
|
5959
|
+
return /* @__PURE__ */ React89.createElement("div", { ref, id, style: styles.spacer, className: classes });
|
|
6024
5960
|
});
|
|
6025
5961
|
Spacer.displayName = "Spacer" /* Spacer */;
|
|
6026
5962
|
var Spacer_default = Spacer;
|
|
6027
5963
|
|
|
6028
5964
|
// components/stepper/Stepper.tsx
|
|
6029
5965
|
var import_clsx78 = __toESM(require("clsx"));
|
|
6030
|
-
var
|
|
6031
|
-
var Stepper =
|
|
5966
|
+
var React90 = __toESM(require("react"));
|
|
5967
|
+
var Stepper = React90.forwardRef(({ className, id, children, ...others }, ref) => {
|
|
6032
5968
|
const { styled } = useTrilogyContext();
|
|
6033
5969
|
const classes = hashClass(styled, (0, import_clsx78.default)("stepper-wrapper", className));
|
|
6034
|
-
const [currentStep, setCurrentStep] =
|
|
6035
|
-
const nbChild =
|
|
5970
|
+
const [currentStep, setCurrentStep] = React90.useState(1);
|
|
5971
|
+
const nbChild = React90.useMemo(() => {
|
|
6036
5972
|
if (children && Array.isArray(children)) return children.length;
|
|
6037
5973
|
if (children && !Array.isArray(children)) return 1;
|
|
6038
5974
|
return 0;
|
|
6039
5975
|
}, [children]);
|
|
6040
|
-
|
|
5976
|
+
React90.useEffect(() => {
|
|
6041
5977
|
if (children) {
|
|
6042
5978
|
if (Array.isArray(children)) {
|
|
6043
5979
|
let haveCurrentStep = false;
|
|
@@ -6054,15 +5990,15 @@ var Stepper = React88.forwardRef(({ className, id, children, ...others }, ref) =
|
|
|
6054
5990
|
}
|
|
6055
5991
|
}
|
|
6056
5992
|
}, [children]);
|
|
6057
|
-
return /* @__PURE__ */
|
|
5993
|
+
return /* @__PURE__ */ React90.createElement("div", { ref, id, className: classes, ...others }, children, /* @__PURE__ */ React90.createElement("div", { className: "step-count" }, /* @__PURE__ */ React90.createElement(Text_default, null, currentStep, "/", nbChild)));
|
|
6058
5994
|
});
|
|
6059
5995
|
Stepper.displayName = "Stepper" /* Stepper */;
|
|
6060
5996
|
var Stepper_default = Stepper;
|
|
6061
5997
|
|
|
6062
5998
|
// components/stepper/step/Step.tsx
|
|
6063
5999
|
var import_clsx79 = __toESM(require("clsx"));
|
|
6064
|
-
var
|
|
6065
|
-
var Step =
|
|
6000
|
+
var import_react48 = __toESM(require("react"));
|
|
6001
|
+
var Step = import_react48.default.forwardRef(({ className, id, active, current, done, label, iconName, error, ...others }, ref) => {
|
|
6066
6002
|
const { styled } = useTrilogyContext();
|
|
6067
6003
|
const classesStepLabel = hashClass(styled, (0, import_clsx79.default)("step-label"));
|
|
6068
6004
|
const classes = hashClass(
|
|
@@ -6076,7 +6012,7 @@ var Step = import_react46.default.forwardRef(({ className, id, active, current,
|
|
|
6076
6012
|
className
|
|
6077
6013
|
)
|
|
6078
6014
|
);
|
|
6079
|
-
return /* @__PURE__ */
|
|
6015
|
+
return /* @__PURE__ */ import_react48.default.createElement("div", { ref, id, className: classes, "data-label": label, ...others }, /* @__PURE__ */ import_react48.default.createElement("div", { className: classesStepLabel }, label, !done && iconName && /* @__PURE__ */ import_react48.default.createElement(Icon_default, { name: iconName && iconName, className: "step-icon", size: "medium" /* MEDIUM */ })));
|
|
6080
6016
|
});
|
|
6081
6017
|
Step.displayName = "Step" /* Step */;
|
|
6082
6018
|
var Step_default = Step;
|
|
@@ -6095,10 +6031,10 @@ var step_default = Step_default;
|
|
|
6095
6031
|
|
|
6096
6032
|
// components/switch/Switch.tsx
|
|
6097
6033
|
var import_clsx80 = __toESM(require("clsx"));
|
|
6098
|
-
var
|
|
6099
|
-
var Switch =
|
|
6034
|
+
var import_react49 = __toESM(require("react"));
|
|
6035
|
+
var Switch = import_react49.default.forwardRef(({
|
|
6100
6036
|
className,
|
|
6101
|
-
id =
|
|
6037
|
+
id = import_react49.default.useId(),
|
|
6102
6038
|
label,
|
|
6103
6039
|
value,
|
|
6104
6040
|
checked,
|
|
@@ -6112,23 +6048,23 @@ var Switch = import_react47.default.forwardRef(({
|
|
|
6112
6048
|
fullWidth,
|
|
6113
6049
|
...others
|
|
6114
6050
|
}, ref) => {
|
|
6115
|
-
const [_checked, setChecked] = (0,
|
|
6051
|
+
const [_checked, setChecked] = (0, import_react49.useState)(checked || false);
|
|
6116
6052
|
const { styled } = useTrilogyContext();
|
|
6117
|
-
|
|
6053
|
+
import_react49.default.useEffect(() => {
|
|
6118
6054
|
setChecked(checked || false);
|
|
6119
6055
|
}, [checked]);
|
|
6120
|
-
(0,
|
|
6056
|
+
(0, import_react49.useEffect)(() => {
|
|
6121
6057
|
if (!readonly) {
|
|
6122
6058
|
setChecked(checked || false);
|
|
6123
6059
|
}
|
|
6124
6060
|
}, [checked, readonly]);
|
|
6125
|
-
return /* @__PURE__ */
|
|
6061
|
+
return /* @__PURE__ */ import_react49.default.createElement(
|
|
6126
6062
|
"div",
|
|
6127
6063
|
{
|
|
6128
6064
|
ref,
|
|
6129
6065
|
className: hashClass(styled, (0, import_clsx80.default)("switch", reversed && is("reversed"), fullWidth && is("fullwidth"), className))
|
|
6130
6066
|
},
|
|
6131
|
-
/* @__PURE__ */
|
|
6067
|
+
/* @__PURE__ */ import_react49.default.createElement(
|
|
6132
6068
|
"input",
|
|
6133
6069
|
{
|
|
6134
6070
|
onChange: (e) => {
|
|
@@ -6164,14 +6100,14 @@ var Switch = import_react47.default.forwardRef(({
|
|
|
6164
6100
|
...others
|
|
6165
6101
|
}
|
|
6166
6102
|
),
|
|
6167
|
-
/* @__PURE__ */
|
|
6103
|
+
/* @__PURE__ */ import_react49.default.createElement("label", { htmlFor: `switch-${id}` }, label)
|
|
6168
6104
|
);
|
|
6169
6105
|
});
|
|
6170
6106
|
Switch.displayName = "Switch" /* Switch */;
|
|
6171
6107
|
var Switch_default = Switch;
|
|
6172
6108
|
|
|
6173
6109
|
// components/table/Table.tsx
|
|
6174
|
-
var
|
|
6110
|
+
var React93 = __toESM(require("react"));
|
|
6175
6111
|
var import_clsx81 = __toESM(require("clsx"));
|
|
6176
6112
|
|
|
6177
6113
|
// components/table/TableProps.ts
|
|
@@ -6183,7 +6119,7 @@ var TableBorderEnum = /* @__PURE__ */ ((TableBorderEnum2) => {
|
|
|
6183
6119
|
})(TableBorderEnum || {});
|
|
6184
6120
|
|
|
6185
6121
|
// components/table/Table.tsx
|
|
6186
|
-
var Table =
|
|
6122
|
+
var Table = React93.forwardRef(({
|
|
6187
6123
|
className,
|
|
6188
6124
|
id,
|
|
6189
6125
|
fullwidth,
|
|
@@ -6204,15 +6140,15 @@ var Table = React91.forwardRef(({
|
|
|
6204
6140
|
className
|
|
6205
6141
|
)
|
|
6206
6142
|
);
|
|
6207
|
-
return /* @__PURE__ */
|
|
6143
|
+
return /* @__PURE__ */ React93.createElement("table", { ref, id, className: classes, ...others });
|
|
6208
6144
|
});
|
|
6209
6145
|
Table.displayName = "Table" /* Table */;
|
|
6210
6146
|
var Table_default = Table;
|
|
6211
6147
|
|
|
6212
6148
|
// components/table/head/TableHead.tsx
|
|
6213
|
-
var
|
|
6149
|
+
var React94 = __toESM(require("react"));
|
|
6214
6150
|
var import_clsx82 = __toESM(require("clsx"));
|
|
6215
|
-
var TableHead =
|
|
6151
|
+
var TableHead = React94.forwardRef(({ className, id, color, backgroundColor, ...others }, ref) => {
|
|
6216
6152
|
const { styled } = useTrilogyContext();
|
|
6217
6153
|
const classes = hashClass(
|
|
6218
6154
|
styled,
|
|
@@ -6222,7 +6158,7 @@ var TableHead = React92.forwardRef(({ className, id, color, backgroundColor, ...
|
|
|
6222
6158
|
color && is(getColorClassName(color))
|
|
6223
6159
|
)
|
|
6224
6160
|
);
|
|
6225
|
-
return /* @__PURE__ */
|
|
6161
|
+
return /* @__PURE__ */ React94.createElement("thead", { ref, id, className: classes, ...others });
|
|
6226
6162
|
});
|
|
6227
6163
|
TableHead.displayName = "TableHead" /* TableHead */;
|
|
6228
6164
|
var TableHead_default = TableHead;
|
|
@@ -6231,9 +6167,9 @@ var TableHead_default = TableHead;
|
|
|
6231
6167
|
var head_default = TableHead_default;
|
|
6232
6168
|
|
|
6233
6169
|
// components/table/body/TableBody.tsx
|
|
6234
|
-
var
|
|
6170
|
+
var React95 = __toESM(require("react"));
|
|
6235
6171
|
var import_clsx83 = __toESM(require("clsx"));
|
|
6236
|
-
var TableBody =
|
|
6172
|
+
var TableBody = React95.forwardRef(({ className, id, color, backgroundColor, ...others }, ref) => {
|
|
6237
6173
|
const { styled } = useTrilogyContext();
|
|
6238
6174
|
const classes = hashClass(
|
|
6239
6175
|
styled,
|
|
@@ -6243,7 +6179,7 @@ var TableBody = React93.forwardRef(({ className, id, color, backgroundColor, ...
|
|
|
6243
6179
|
color && is(getColorClassName(color))
|
|
6244
6180
|
)
|
|
6245
6181
|
);
|
|
6246
|
-
return /* @__PURE__ */
|
|
6182
|
+
return /* @__PURE__ */ React95.createElement("tbody", { ref, id, className: classes, ...others });
|
|
6247
6183
|
});
|
|
6248
6184
|
TableBody.displayName = "TableBody" /* TableBody */;
|
|
6249
6185
|
var TableBody_default = TableBody;
|
|
@@ -6252,12 +6188,12 @@ var TableBody_default = TableBody;
|
|
|
6252
6188
|
var body_default = TableBody_default;
|
|
6253
6189
|
|
|
6254
6190
|
// components/table/th/TableTh.tsx
|
|
6255
|
-
var
|
|
6191
|
+
var React96 = __toESM(require("react"));
|
|
6256
6192
|
var import_clsx84 = __toESM(require("clsx"));
|
|
6257
|
-
var TableTh =
|
|
6193
|
+
var TableTh = React96.forwardRef(({ className, id, colSpan, rowSpan, ...others }, ref) => {
|
|
6258
6194
|
const { styled } = useTrilogyContext();
|
|
6259
6195
|
const classes = hashClass(styled, (0, import_clsx84.default)(className));
|
|
6260
|
-
return /* @__PURE__ */
|
|
6196
|
+
return /* @__PURE__ */ React96.createElement("th", { ref, id, className: classes, colSpan, rowSpan, ...others });
|
|
6261
6197
|
});
|
|
6262
6198
|
TableTh.displayName = "TableTh" /* TableTh */;
|
|
6263
6199
|
var TableTh_default = TableTh;
|
|
@@ -6266,9 +6202,9 @@ var TableTh_default = TableTh;
|
|
|
6266
6202
|
var th_default = TableTh_default;
|
|
6267
6203
|
|
|
6268
6204
|
// components/table/tr/TableTr.tsx
|
|
6269
|
-
var
|
|
6205
|
+
var React97 = __toESM(require("react"));
|
|
6270
6206
|
var import_clsx85 = __toESM(require("clsx"));
|
|
6271
|
-
var TableTr =
|
|
6207
|
+
var TableTr = React97.forwardRef(({
|
|
6272
6208
|
className,
|
|
6273
6209
|
id,
|
|
6274
6210
|
expandable,
|
|
@@ -6288,7 +6224,7 @@ var TableTr = React95.forwardRef(({
|
|
|
6288
6224
|
color && getColorClassName(color)
|
|
6289
6225
|
)
|
|
6290
6226
|
);
|
|
6291
|
-
return /* @__PURE__ */
|
|
6227
|
+
return /* @__PURE__ */ React97.createElement("tr", { ref, id, className: classes, ...others });
|
|
6292
6228
|
});
|
|
6293
6229
|
TableTr.displayName = "TableTr" /* TableTr */;
|
|
6294
6230
|
var TableTr_default = TableTr;
|
|
@@ -6297,12 +6233,12 @@ var TableTr_default = TableTr;
|
|
|
6297
6233
|
var tr_default = TableTr_default;
|
|
6298
6234
|
|
|
6299
6235
|
// components/table/td/TableTd.tsx
|
|
6300
|
-
var
|
|
6236
|
+
var React98 = __toESM(require("react"));
|
|
6301
6237
|
var import_clsx86 = __toESM(require("clsx"));
|
|
6302
|
-
var TableTd =
|
|
6238
|
+
var TableTd = React98.forwardRef(({ className, id, rowSpan, colSpan, ...others }, ref) => {
|
|
6303
6239
|
const { styled } = useTrilogyContext();
|
|
6304
6240
|
const classes = hashClass(styled, (0, import_clsx86.default)(className));
|
|
6305
|
-
return /* @__PURE__ */
|
|
6241
|
+
return /* @__PURE__ */ React98.createElement("td", { ref, id, className: classes, rowSpan, colSpan, ...others });
|
|
6306
6242
|
});
|
|
6307
6243
|
TableTd.displayName = "TableTd" /* TableTd */;
|
|
6308
6244
|
var TableTd_default = TableTd;
|
|
@@ -6311,8 +6247,8 @@ var TableTd_default = TableTd;
|
|
|
6311
6247
|
var td_default = TableTd_default;
|
|
6312
6248
|
|
|
6313
6249
|
// components/tabs/context/index.tsx
|
|
6314
|
-
var
|
|
6315
|
-
var TabsContext =
|
|
6250
|
+
var import_react50 = __toESM(require("react"));
|
|
6251
|
+
var TabsContext = import_react50.default.createContext({
|
|
6316
6252
|
activeIndex: 0,
|
|
6317
6253
|
inverted: false,
|
|
6318
6254
|
setActiveIndex: () => 0,
|
|
@@ -6323,20 +6259,20 @@ var TabsContext = import_react48.default.createContext({
|
|
|
6323
6259
|
|
|
6324
6260
|
// components/tabs/Tabs.tsx
|
|
6325
6261
|
var import_clsx87 = __toESM(require("clsx"));
|
|
6326
|
-
var
|
|
6327
|
-
var Tabs =
|
|
6262
|
+
var import_react51 = __toESM(require("react"));
|
|
6263
|
+
var Tabs = import_react51.default.forwardRef(
|
|
6328
6264
|
({ children, className, id, activeIndex, fullwidth, inverted, small }, ref) => {
|
|
6329
|
-
const [currentIndex, setCurrentIndex] =
|
|
6330
|
-
const [isInverted, setIsInverted] =
|
|
6265
|
+
const [currentIndex, setCurrentIndex] = import_react51.default.useState(activeIndex || 0);
|
|
6266
|
+
const [isInverted, setIsInverted] = import_react51.default.useState(inverted || false);
|
|
6331
6267
|
const { styled } = useTrilogyContext();
|
|
6332
6268
|
const classes = hashClass(
|
|
6333
6269
|
styled,
|
|
6334
6270
|
(0, import_clsx87.default)("tabs", fullwidth && is("fullwidth"), inverted && is("inverted"), small && is("small"), className)
|
|
6335
6271
|
);
|
|
6336
|
-
|
|
6272
|
+
import_react51.default.useEffect(() => {
|
|
6337
6273
|
activeIndex !== void 0 && setCurrentIndex(activeIndex);
|
|
6338
6274
|
}, [activeIndex]);
|
|
6339
|
-
return /* @__PURE__ */
|
|
6275
|
+
return /* @__PURE__ */ import_react51.default.createElement(
|
|
6340
6276
|
TabsContext.Provider,
|
|
6341
6277
|
{
|
|
6342
6278
|
value: {
|
|
@@ -6347,7 +6283,7 @@ var Tabs = import_react49.default.forwardRef(
|
|
|
6347
6283
|
setActiveIndex: setCurrentIndex
|
|
6348
6284
|
}
|
|
6349
6285
|
},
|
|
6350
|
-
/* @__PURE__ */
|
|
6286
|
+
/* @__PURE__ */ import_react51.default.createElement("div", { ref, id, className: classes, "data-tabs-context": "" }, children)
|
|
6351
6287
|
);
|
|
6352
6288
|
}
|
|
6353
6289
|
);
|
|
@@ -6356,16 +6292,16 @@ var Tabs_default = Tabs;
|
|
|
6356
6292
|
|
|
6357
6293
|
// components/tabs/tab-list/tab/Tab.tsx
|
|
6358
6294
|
var import_clsx88 = __toESM(require("clsx"));
|
|
6359
|
-
var
|
|
6360
|
-
var Tab =
|
|
6295
|
+
var import_react52 = __toESM(require("react"));
|
|
6296
|
+
var Tab = import_react52.default.forwardRef(
|
|
6361
6297
|
({ active, className, onClick, routerLink = "a", iconName, label, disabled, testId, ariaControls, ...others }, ref) => {
|
|
6362
6298
|
const { styled } = useTrilogyContext();
|
|
6363
6299
|
const { index, ...props } = others;
|
|
6364
|
-
const { activeIndex, setActiveIndex, small } =
|
|
6300
|
+
const { activeIndex, setActiveIndex, small } = import_react52.default.useContext(TabsContext);
|
|
6365
6301
|
const Tag2 = others.href || others.to ? routerLink : "button";
|
|
6366
|
-
const isActive =
|
|
6302
|
+
const isActive = import_react52.default.useMemo(() => activeIndex === index, [activeIndex, index]);
|
|
6367
6303
|
const classes = hashClass(styled, (0, import_clsx88.default)("tab", className, { "is-active": isActive }));
|
|
6368
|
-
const handleClick =
|
|
6304
|
+
const handleClick = import_react52.default.useCallback(
|
|
6369
6305
|
(e) => {
|
|
6370
6306
|
if (!disabled) {
|
|
6371
6307
|
if (!others.href && !others.to) setActiveIndex(index);
|
|
@@ -6374,10 +6310,10 @@ var Tab = import_react50.default.forwardRef(
|
|
|
6374
6310
|
},
|
|
6375
6311
|
[disabled, onClick, index, setActiveIndex]
|
|
6376
6312
|
);
|
|
6377
|
-
|
|
6313
|
+
import_react52.default.useEffect(() => {
|
|
6378
6314
|
if (active) setActiveIndex(index);
|
|
6379
6315
|
}, [active, setActiveIndex, index]);
|
|
6380
|
-
return /* @__PURE__ */
|
|
6316
|
+
return /* @__PURE__ */ import_react52.default.createElement(
|
|
6381
6317
|
Tag2,
|
|
6382
6318
|
{
|
|
6383
6319
|
ref,
|
|
@@ -6393,8 +6329,8 @@ var Tab = import_react50.default.forwardRef(
|
|
|
6393
6329
|
onClick: handleClick,
|
|
6394
6330
|
...props
|
|
6395
6331
|
},
|
|
6396
|
-
/* @__PURE__ */
|
|
6397
|
-
label && /* @__PURE__ */
|
|
6332
|
+
/* @__PURE__ */ import_react52.default.createElement("div", { className: hashClass(styled, "tab-icon") }, iconName && /* @__PURE__ */ import_react52.default.createElement(Icon_default, { size: small ? "small" : "medium", name: iconName })),
|
|
6333
|
+
label && /* @__PURE__ */ import_react52.default.createElement(Text_default, null, label)
|
|
6398
6334
|
);
|
|
6399
6335
|
}
|
|
6400
6336
|
);
|
|
@@ -6403,31 +6339,31 @@ var Tab_default = Tab;
|
|
|
6403
6339
|
|
|
6404
6340
|
// components/tabs/tab-list/TabList.tsx
|
|
6405
6341
|
var import_clsx89 = __toESM(require("clsx"));
|
|
6406
|
-
var
|
|
6407
|
-
var TabList =
|
|
6342
|
+
var import_react53 = __toESM(require("react"));
|
|
6343
|
+
var TabList = import_react53.default.forwardRef(
|
|
6408
6344
|
({ children, className, id, testId, align, ...others }, ref) => {
|
|
6409
6345
|
const { styled } = useTrilogyContext();
|
|
6410
|
-
const TabListRef =
|
|
6411
|
-
const tabRefs =
|
|
6412
|
-
const { small } =
|
|
6413
|
-
|
|
6414
|
-
const [tabsWidth, setTabsWidth] =
|
|
6415
|
-
const [tabListWidth, setTabListWidth] =
|
|
6416
|
-
const [scrollLeft, setScrollLeft] =
|
|
6417
|
-
const [tabFocused, setTabFocused] =
|
|
6346
|
+
const TabListRef = import_react53.default.useRef(null);
|
|
6347
|
+
const tabRefs = import_react53.default.useRef([]);
|
|
6348
|
+
const { small } = import_react53.default.useContext(TabsContext);
|
|
6349
|
+
import_react53.default.useImperativeHandle(ref, () => TabListRef.current);
|
|
6350
|
+
const [tabsWidth, setTabsWidth] = import_react53.default.useState(0);
|
|
6351
|
+
const [tabListWidth, setTabListWidth] = import_react53.default.useState(0);
|
|
6352
|
+
const [scrollLeft, setScrollLeft] = import_react53.default.useState(0);
|
|
6353
|
+
const [tabFocused, setTabFocused] = import_react53.default.useState(0);
|
|
6418
6354
|
const classes = hashClass(styled, (0, import_clsx89.default)("tab-list", align && is(getAlignClassName(align)), className));
|
|
6419
|
-
const isVisibleArrowLeft = (0,
|
|
6355
|
+
const isVisibleArrowLeft = (0, import_react53.useMemo)(() => {
|
|
6420
6356
|
if (!tabRefs.current.length) return false;
|
|
6421
6357
|
return scrollLeft > tabRefs.current[0].width / 2;
|
|
6422
6358
|
}, [tabRefs, scrollLeft]);
|
|
6423
|
-
const isVisibleArrowRight = (0,
|
|
6359
|
+
const isVisibleArrowRight = (0, import_react53.useMemo)(
|
|
6424
6360
|
() => tabListWidth - tabsWidth - scrollLeft > 5,
|
|
6425
6361
|
[tabListWidth, tabsWidth, scrollLeft]
|
|
6426
6362
|
);
|
|
6427
|
-
const TabElms =
|
|
6428
|
-
return
|
|
6429
|
-
if (!
|
|
6430
|
-
return /* @__PURE__ */
|
|
6363
|
+
const TabElms = import_react53.default.useMemo(() => {
|
|
6364
|
+
return import_react53.default.Children.map(children, (child, index) => {
|
|
6365
|
+
if (!import_react53.default.isValidElement(child)) return false;
|
|
6366
|
+
return /* @__PURE__ */ import_react53.default.createElement(
|
|
6431
6367
|
Tab_default,
|
|
6432
6368
|
{
|
|
6433
6369
|
ref: (el) => tabRefs.current[index] = el == null ? void 0 : el.getBoundingClientRect(),
|
|
@@ -6437,7 +6373,7 @@ var TabList = import_react51.default.forwardRef(
|
|
|
6437
6373
|
);
|
|
6438
6374
|
});
|
|
6439
6375
|
}, [children, tabRefs]);
|
|
6440
|
-
const scrollWithArrow =
|
|
6376
|
+
const scrollWithArrow = import_react53.default.useCallback(
|
|
6441
6377
|
(direction) => {
|
|
6442
6378
|
var _a;
|
|
6443
6379
|
if (tabRefs.current) {
|
|
@@ -6449,7 +6385,7 @@ var TabList = import_react51.default.forwardRef(
|
|
|
6449
6385
|
},
|
|
6450
6386
|
[tabRefs.current, tabFocused, TabListRef]
|
|
6451
6387
|
);
|
|
6452
|
-
const handleScrollList =
|
|
6388
|
+
const handleScrollList = import_react53.default.useCallback(
|
|
6453
6389
|
(e) => {
|
|
6454
6390
|
const target = e.target;
|
|
6455
6391
|
const firstGap = tabRefs.current[0].x + (small ? 16 : 24);
|
|
@@ -6461,26 +6397,26 @@ var TabList = import_react51.default.forwardRef(
|
|
|
6461
6397
|
},
|
|
6462
6398
|
[tabRefs, small]
|
|
6463
6399
|
);
|
|
6464
|
-
const onClickPrev =
|
|
6400
|
+
const onClickPrev = import_react53.default.useCallback(() => {
|
|
6465
6401
|
isVisibleArrowLeft && scrollWithArrow(-1);
|
|
6466
6402
|
}, [scrollWithArrow, isVisibleArrowLeft]);
|
|
6467
|
-
const onClickNext =
|
|
6403
|
+
const onClickNext = import_react53.default.useCallback(() => {
|
|
6468
6404
|
isVisibleArrowRight && scrollWithArrow(1);
|
|
6469
6405
|
}, [scrollWithArrow, isVisibleArrowRight]);
|
|
6470
|
-
const setWidths =
|
|
6406
|
+
const setWidths = import_react53.default.useCallback(() => {
|
|
6471
6407
|
if (TabListRef.current) {
|
|
6472
6408
|
setTabsWidth(TabListRef.current.clientWidth);
|
|
6473
6409
|
setTabListWidth(TabListRef.current.scrollWidth);
|
|
6474
6410
|
}
|
|
6475
6411
|
}, [TabListRef]);
|
|
6476
|
-
|
|
6412
|
+
import_react53.default.useEffect(() => {
|
|
6477
6413
|
setWidths();
|
|
6478
6414
|
}, [setWidths, isVisibleArrowLeft, isVisibleArrowRight]);
|
|
6479
|
-
|
|
6415
|
+
import_react53.default.useEffect(() => {
|
|
6480
6416
|
window.addEventListener("resize", setWidths);
|
|
6481
6417
|
return () => window.removeEventListener("resize", setWidths);
|
|
6482
6418
|
}, [TabListRef, setWidths]);
|
|
6483
|
-
return /* @__PURE__ */
|
|
6419
|
+
return /* @__PURE__ */ import_react53.default.createElement(
|
|
6484
6420
|
"div",
|
|
6485
6421
|
{
|
|
6486
6422
|
ref: TabListRef,
|
|
@@ -6491,7 +6427,7 @@ var TabList = import_react51.default.forwardRef(
|
|
|
6491
6427
|
onScroll: handleScrollList,
|
|
6492
6428
|
...others
|
|
6493
6429
|
},
|
|
6494
|
-
isVisibleArrowLeft && /* @__PURE__ */
|
|
6430
|
+
isVisibleArrowLeft && /* @__PURE__ */ import_react53.default.createElement(
|
|
6495
6431
|
Icon_default,
|
|
6496
6432
|
{
|
|
6497
6433
|
"data-arrow-prev": "",
|
|
@@ -6502,7 +6438,7 @@ var TabList = import_react51.default.forwardRef(
|
|
|
6502
6438
|
}
|
|
6503
6439
|
),
|
|
6504
6440
|
TabElms,
|
|
6505
|
-
isVisibleArrowRight && /* @__PURE__ */
|
|
6441
|
+
isVisibleArrowRight && /* @__PURE__ */ import_react53.default.createElement(
|
|
6506
6442
|
Icon_default,
|
|
6507
6443
|
{
|
|
6508
6444
|
"data-arrow-next": "",
|
|
@@ -6520,13 +6456,13 @@ var TabList_default = TabList;
|
|
|
6520
6456
|
|
|
6521
6457
|
// components/tabs/tab-panels/tab-panel/TabPanel.tsx
|
|
6522
6458
|
var import_clsx90 = __toESM(require("clsx"));
|
|
6523
|
-
var
|
|
6524
|
-
var TabPanel =
|
|
6459
|
+
var import_react54 = __toESM(require("react"));
|
|
6460
|
+
var TabPanel = import_react54.default.forwardRef(({ children, className, testId, ...others }, ref) => {
|
|
6525
6461
|
const { styled } = useTrilogyContext();
|
|
6526
6462
|
const { index, ...props } = others;
|
|
6527
|
-
const { activeIndex } =
|
|
6463
|
+
const { activeIndex } = import_react54.default.useContext(TabsContext);
|
|
6528
6464
|
const classes = hashClass(styled, (0, import_clsx90.default)("tab-panel", index === activeIndex && is("active"), className));
|
|
6529
|
-
return /* @__PURE__ */
|
|
6465
|
+
return /* @__PURE__ */ import_react54.default.createElement("div", { ref, "data-testid": testId, className: classes, ...props }, children);
|
|
6530
6466
|
});
|
|
6531
6467
|
TabPanel.displayName = "TabPanel" /* TabPanel */;
|
|
6532
6468
|
var TabPanel_default = TabPanel;
|
|
@@ -6536,13 +6472,13 @@ var tab_panel_default = TabPanel_default;
|
|
|
6536
6472
|
|
|
6537
6473
|
// components/tabs/tab-panels/TabPanels.tsx
|
|
6538
6474
|
var import_clsx91 = __toESM(require("clsx"));
|
|
6539
|
-
var
|
|
6540
|
-
var TabPanels =
|
|
6475
|
+
var import_react55 = __toESM(require("react"));
|
|
6476
|
+
var TabPanels = import_react55.default.forwardRef(({ children, className, id, testId, ...others }, ref) => {
|
|
6541
6477
|
const { styled } = useTrilogyContext();
|
|
6542
6478
|
const classes = hashClass(styled, (0, import_clsx91.default)("tab-panels", className));
|
|
6543
|
-
return /* @__PURE__ */
|
|
6544
|
-
if (!
|
|
6545
|
-
return /* @__PURE__ */
|
|
6479
|
+
return /* @__PURE__ */ import_react55.default.createElement("div", { ref, id, "data-testid": testId, className: classes, ...others }, import_react55.default.Children.map(children, (child, index) => {
|
|
6480
|
+
if (!import_react55.default.isValidElement(child)) return false;
|
|
6481
|
+
return /* @__PURE__ */ import_react55.default.createElement(tab_panel_default, { ...child.props, index });
|
|
6546
6482
|
}));
|
|
6547
6483
|
});
|
|
6548
6484
|
TabPanels.displayName = "TabPanels" /* TabPanels */;
|
|
@@ -6550,8 +6486,8 @@ var TabPanels_default = TabPanels;
|
|
|
6550
6486
|
|
|
6551
6487
|
// components/tag/Tag.tsx
|
|
6552
6488
|
var import_clsx92 = __toESM(require("clsx"));
|
|
6553
|
-
var
|
|
6554
|
-
var Tag =
|
|
6489
|
+
var import_react56 = __toESM(require("react"));
|
|
6490
|
+
var Tag = import_react56.default.forwardRef(
|
|
6555
6491
|
({ label, className, id, variant, inverted, small, iconName, ...others }, ref) => {
|
|
6556
6492
|
const { styled } = useTrilogyContext();
|
|
6557
6493
|
const tagClassNames = hashClass(
|
|
@@ -6565,7 +6501,7 @@ var Tag = import_react54.default.forwardRef(
|
|
|
6565
6501
|
)
|
|
6566
6502
|
);
|
|
6567
6503
|
const tagIconClassNames = (0, import_clsx92.default)(variant && is(getColorClassName(variant)));
|
|
6568
|
-
return /* @__PURE__ */
|
|
6504
|
+
return /* @__PURE__ */ import_react56.default.createElement("span", { ref, id, className: tagClassNames, ...others }, iconName && /* @__PURE__ */ import_react56.default.createElement(Icon_default, { className: tagIconClassNames, name: iconName }), label);
|
|
6569
6505
|
}
|
|
6570
6506
|
);
|
|
6571
6507
|
Tag.displayName = "Tag" /* Tag */;
|
|
@@ -6573,10 +6509,10 @@ var Tag_default = Tag;
|
|
|
6573
6509
|
|
|
6574
6510
|
// components/tag/list/TagList.tsx
|
|
6575
6511
|
var import_clsx93 = __toESM(require("clsx"));
|
|
6576
|
-
var
|
|
6577
|
-
var TagList =
|
|
6512
|
+
var React106 = __toESM(require("react"));
|
|
6513
|
+
var TagList = React106.forwardRef(({ className, id, align, marginless, ...others }, ref) => {
|
|
6578
6514
|
const { styled } = useTrilogyContext();
|
|
6579
|
-
return /* @__PURE__ */
|
|
6515
|
+
return /* @__PURE__ */ React106.createElement(
|
|
6580
6516
|
"div",
|
|
6581
6517
|
{
|
|
6582
6518
|
ref,
|
|
@@ -6606,8 +6542,8 @@ var TagVariant = /* @__PURE__ */ ((TagVariant2) => {
|
|
|
6606
6542
|
|
|
6607
6543
|
// components/textarea/Textarea.tsx
|
|
6608
6544
|
var import_clsx94 = __toESM(require("clsx"));
|
|
6609
|
-
var
|
|
6610
|
-
var Textarea =
|
|
6545
|
+
var import_react57 = __toESM(require("react"));
|
|
6546
|
+
var Textarea = import_react57.default.forwardRef(
|
|
6611
6547
|
({
|
|
6612
6548
|
className,
|
|
6613
6549
|
id,
|
|
@@ -6628,9 +6564,9 @@ var Textarea = import_react55.default.forwardRef(
|
|
|
6628
6564
|
iconNameRight,
|
|
6629
6565
|
...others
|
|
6630
6566
|
}, ref) => {
|
|
6631
|
-
const [value, setValue] = (0,
|
|
6567
|
+
const [value, setValue] = (0, import_react57.useState)(defaultValue || "");
|
|
6632
6568
|
const { styled } = useTrilogyContext();
|
|
6633
|
-
(0,
|
|
6569
|
+
(0, import_react57.useEffect)(() => {
|
|
6634
6570
|
setValue(defaultValue || "");
|
|
6635
6571
|
}, [defaultValue]);
|
|
6636
6572
|
const wrapperClasses = hashClass(styled, (0, import_clsx94.default)("field textarea-wrapper", className, status && is(status)));
|
|
@@ -6641,7 +6577,7 @@ var Textarea = import_react55.default.forwardRef(
|
|
|
6641
6577
|
styled,
|
|
6642
6578
|
(0, import_clsx94.default)("control", iconNameLeft && has("icons-left"), iconNameRight && has("icons-right"))
|
|
6643
6579
|
);
|
|
6644
|
-
return /* @__PURE__ */
|
|
6580
|
+
return /* @__PURE__ */ import_react57.default.createElement("div", { id, className: wrapperClasses }, label && /* @__PURE__ */ import_react57.default.createElement("label", { className: hashClass(styled, "textarea-label"), htmlFor: id }, label, " ", required && /* @__PURE__ */ import_react57.default.createElement(Text_default, { markup: "span" /* SPAN */, typo: "has-text-error" /* TEXT_ERROR */ }, "*")), sample && /* @__PURE__ */ import_react57.default.createElement(Text_default, { className: "input-sample", level: 2 /* TWO */, id }, sample), /* @__PURE__ */ import_react57.default.createElement("div", { className: controlClasses }, /* @__PURE__ */ import_react57.default.createElement(
|
|
6645
6581
|
"textarea",
|
|
6646
6582
|
{
|
|
6647
6583
|
ref,
|
|
@@ -6664,7 +6600,7 @@ var Textarea = import_react55.default.forwardRef(
|
|
|
6664
6600
|
required,
|
|
6665
6601
|
...others
|
|
6666
6602
|
}
|
|
6667
|
-
), iconNameLeft && /* @__PURE__ */
|
|
6603
|
+
), iconNameLeft && /* @__PURE__ */ import_react57.default.createElement(Icon_default, { name: iconNameLeft, size: "small", className: "icon-left" }), iconNameRight && /* @__PURE__ */ import_react57.default.createElement(Icon_default, { name: iconNameRight, size: "small", className: "icon-right" }), maxLength && /* @__PURE__ */ import_react57.default.createElement("div", { className: counterClasses }, `${value.length}/${maxLength == null ? void 0 : maxLength.toString()}`)), help && /* @__PURE__ */ import_react57.default.createElement(Text_default, { className: helpClasses }, help));
|
|
6668
6604
|
}
|
|
6669
6605
|
);
|
|
6670
6606
|
Textarea.displayName = "Textarea" /* Textarea */;
|
|
@@ -6672,15 +6608,15 @@ var Textarea_default = Textarea;
|
|
|
6672
6608
|
|
|
6673
6609
|
// components/timeline/content/TimelineContent.tsx
|
|
6674
6610
|
var import_clsx95 = __toESM(require("clsx"));
|
|
6675
|
-
var
|
|
6676
|
-
var TimelineContent =
|
|
6611
|
+
var React108 = __toESM(require("react"));
|
|
6612
|
+
var TimelineContent = React108.forwardRef(
|
|
6677
6613
|
({ children, className, id, heading, content, linkLabel, linkTo, ...others }, ref) => {
|
|
6678
6614
|
const { styled } = useTrilogyContext();
|
|
6679
6615
|
const classes = hashClass(styled, (0, import_clsx95.default)("timeline-content", className));
|
|
6680
6616
|
if (children) {
|
|
6681
|
-
return /* @__PURE__ */
|
|
6617
|
+
return /* @__PURE__ */ React108.createElement("div", { ref, id, className: classes, ...others }, children);
|
|
6682
6618
|
}
|
|
6683
|
-
return /* @__PURE__ */
|
|
6619
|
+
return /* @__PURE__ */ React108.createElement("div", { ref, id, className: classes, ...others }, heading && /* @__PURE__ */ React108.createElement(Text_default, { markup: "p" /* P */ }, heading), content && /* @__PURE__ */ React108.createElement(Text_default, { className: "main-content", markup: "p" /* P */ }, content), linkTo && linkLabel && /* @__PURE__ */ React108.createElement(Link_default, { href: linkTo }, linkLabel));
|
|
6684
6620
|
}
|
|
6685
6621
|
);
|
|
6686
6622
|
TimelineContent.displayName = "TimelineContent" /* TimelineContent */;
|
|
@@ -6691,14 +6627,14 @@ var content_default3 = TimelineContent_default;
|
|
|
6691
6627
|
|
|
6692
6628
|
// components/timeline/item/TimelineItem.tsx
|
|
6693
6629
|
var import_clsx96 = __toESM(require("clsx"));
|
|
6694
|
-
var
|
|
6695
|
-
var TimelineItem =
|
|
6630
|
+
var React109 = __toESM(require("react"));
|
|
6631
|
+
var TimelineItem = React109.forwardRef(({ className, id, done, active, cancel, ...others }, ref) => {
|
|
6696
6632
|
const { styled } = useTrilogyContext();
|
|
6697
6633
|
const classes = hashClass(
|
|
6698
6634
|
styled,
|
|
6699
6635
|
(0, import_clsx96.default)("timeline-item", done && "done", active && "active", cancel && "cancel", className)
|
|
6700
6636
|
);
|
|
6701
|
-
return /* @__PURE__ */
|
|
6637
|
+
return /* @__PURE__ */ React109.createElement("div", { ref, id, className: classes, ...others });
|
|
6702
6638
|
});
|
|
6703
6639
|
TimelineItem.displayName = "TimelineItem" /* TimelineItem */;
|
|
6704
6640
|
var TimelineItem_default = TimelineItem;
|
|
@@ -6708,8 +6644,8 @@ var item_default5 = TimelineItem_default;
|
|
|
6708
6644
|
|
|
6709
6645
|
// components/timeline/marker/TimelineMarker.tsx
|
|
6710
6646
|
var import_clsx97 = __toESM(require("clsx"));
|
|
6711
|
-
var
|
|
6712
|
-
var TimelineMarker =
|
|
6647
|
+
var React110 = __toESM(require("react"));
|
|
6648
|
+
var TimelineMarker = React110.forwardRef(({
|
|
6713
6649
|
className,
|
|
6714
6650
|
id,
|
|
6715
6651
|
iconClassname,
|
|
@@ -6719,7 +6655,7 @@ var TimelineMarker = React108.forwardRef(({
|
|
|
6719
6655
|
const { styled } = useTrilogyContext();
|
|
6720
6656
|
const classes = hashClass(styled, (0, import_clsx97.default)("timeline-marker", is("icon"), className));
|
|
6721
6657
|
const iconClasses = (0, import_clsx97.default)(iconClassname);
|
|
6722
|
-
return /* @__PURE__ */
|
|
6658
|
+
return /* @__PURE__ */ React110.createElement("div", { ref, id, className: classes, ...others }, /* @__PURE__ */ React110.createElement("div", { className: "card-header-icon" }, /* @__PURE__ */ React110.createElement(Icon_default, { className: iconClasses, name: iconName, size: "small" /* SMALL */ })));
|
|
6723
6659
|
});
|
|
6724
6660
|
TimelineMarker.displayName = "TimelineMarker" /* TimelineMarker */;
|
|
6725
6661
|
var TimelineMarker_default = TimelineMarker;
|
|
@@ -6729,18 +6665,18 @@ var marker_default = TimelineMarker_default;
|
|
|
6729
6665
|
|
|
6730
6666
|
// components/timeline/Timeline.tsx
|
|
6731
6667
|
var import_clsx98 = __toESM(require("clsx"));
|
|
6732
|
-
var
|
|
6733
|
-
var Timeline =
|
|
6668
|
+
var React111 = __toESM(require("react"));
|
|
6669
|
+
var Timeline = React111.forwardRef(({ className, id, horizontal, ...others }, ref) => {
|
|
6734
6670
|
const { styled } = useTrilogyContext();
|
|
6735
6671
|
const classes = hashClass(styled, (0, import_clsx98.default)("timeline", horizontal && is("horizontal"), className));
|
|
6736
|
-
return /* @__PURE__ */
|
|
6672
|
+
return /* @__PURE__ */ React111.createElement("div", { ref, id, className: classes, ...others });
|
|
6737
6673
|
});
|
|
6738
6674
|
Timeline.displayName = "Timeline" /* Timeline */;
|
|
6739
6675
|
var Timeline_default = Timeline;
|
|
6740
6676
|
|
|
6741
6677
|
// components/view/View.tsx
|
|
6742
6678
|
var import_clsx99 = __toESM(require("clsx"));
|
|
6743
|
-
var
|
|
6679
|
+
var React112 = __toESM(require("react"));
|
|
6744
6680
|
|
|
6745
6681
|
// components/view/ViewProps/index.ts
|
|
6746
6682
|
var ViewMarkup = /* @__PURE__ */ ((ViewMarkup2) => {
|
|
@@ -6765,7 +6701,7 @@ var ViewMarkup = /* @__PURE__ */ ((ViewMarkup2) => {
|
|
|
6765
6701
|
})(ViewMarkup || {});
|
|
6766
6702
|
|
|
6767
6703
|
// components/view/View.tsx
|
|
6768
|
-
var
|
|
6704
|
+
var View = React112.forwardRef(({
|
|
6769
6705
|
children,
|
|
6770
6706
|
style,
|
|
6771
6707
|
className,
|
|
@@ -6802,7 +6738,7 @@ var View2 = React110.forwardRef(({
|
|
|
6802
6738
|
className
|
|
6803
6739
|
)
|
|
6804
6740
|
);
|
|
6805
|
-
return /* @__PURE__ */
|
|
6741
|
+
return /* @__PURE__ */ React112.createElement(
|
|
6806
6742
|
Tag2,
|
|
6807
6743
|
{
|
|
6808
6744
|
ref,
|
|
@@ -6821,7 +6757,7 @@ var View2 = React110.forwardRef(({
|
|
|
6821
6757
|
children
|
|
6822
6758
|
);
|
|
6823
6759
|
});
|
|
6824
|
-
var View_default =
|
|
6760
|
+
var View_default = View;
|
|
6825
6761
|
|
|
6826
6762
|
// components/view/ViewEnum.ts
|
|
6827
6763
|
var ViewColor = /* @__PURE__ */ ((ViewColor2) => {
|