@trilogy-ds/react 0.0.17-esm-cjs → 0.0.18-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-CWOJMTBG.mjs → chunk-23RKW2TY.mjs} +1 -1
- package/lib/{chunk-PTHFF3G5.mjs → chunk-24R7IYOG.mjs} +5 -5
- package/lib/{chunk-TDYLTSUD.mjs → chunk-252FYXMD.mjs} +2 -2
- package/lib/{chunk-TBCW3ORO.mjs → chunk-27BK6EVC.mjs} +4 -4
- package/lib/{chunk-CNQXLWB6.mjs → chunk-2FPIT2VY.mjs} +3 -3
- package/lib/{chunk-GOX7ZBMG.mjs → chunk-2IGMY535.mjs} +15 -4
- package/lib/{chunk-LO433DOQ.mjs → chunk-2MIHKT5E.mjs} +1 -1
- package/lib/{chunk-YORBTFM6.mjs → chunk-2MP6W4C2.mjs} +4 -4
- package/lib/{chunk-J4TV7QTJ.mjs → chunk-2SIDIWLZ.mjs} +31 -14
- package/lib/chunk-2T6URXV2.mjs +88 -0
- package/lib/{chunk-5Z2RQ5MY.mjs → chunk-2ZXXN4R4.mjs} +1 -1
- package/lib/chunk-33VW4RVE.mjs +94 -0
- package/lib/{chunk-G5BYIVYU.mjs → chunk-3APJ5TJP.mjs} +2 -2
- package/lib/{chunk-KZ3GTDH6.mjs → chunk-3GLD7T7V.mjs} +1 -1
- package/lib/{chunk-WCYJXOFQ.mjs → chunk-3HY3E3O3.mjs} +16 -5
- package/lib/{chunk-UESRINZG.mjs → chunk-3I74MN5M.mjs} +4 -4
- package/lib/{chunk-J2RYZOPI.mjs → chunk-3LXODEBD.mjs} +1 -1
- package/lib/chunk-3OWVPQQ3.mjs +47 -0
- package/lib/{chunk-REWE5O46.mjs → chunk-432FETUO.mjs} +1 -1
- package/lib/{chunk-W6D7Y225.mjs → chunk-44BUDUHH.mjs} +4 -1
- package/lib/{chunk-BUHGINEV.mjs → chunk-44DOSDMV.mjs} +1 -1
- package/lib/chunk-4FJA5ASG.mjs +56 -0
- package/lib/chunk-4GKCUICZ.mjs +99 -0
- package/lib/{chunk-AKMN7UO5.mjs → chunk-573KW52P.mjs} +17 -5
- package/lib/{chunk-MLDIC7PA.mjs → chunk-5ALKJFH4.mjs} +1 -1
- package/lib/{chunk-O6QKUT7P.mjs → chunk-5DY6WPCA.mjs} +8 -8
- package/lib/{chunk-Z7UII2QG.mjs → chunk-5GGDXVOY.mjs} +1 -1
- package/lib/{chunk-X3O5WJNB.mjs → chunk-5JFVDSGE.mjs} +1 -1
- package/lib/chunk-5NJMUSWY.mjs +40 -0
- package/lib/chunk-5UAX67EN.mjs +35 -0
- package/lib/chunk-65K3LXTO.mjs +23 -0
- package/lib/{chunk-VYZ76EPZ.mjs → chunk-67BVHO7H.mjs} +3 -3
- package/lib/chunk-6AFOGEEB.mjs +41 -0
- package/lib/{chunk-C2KSCUJR.mjs → chunk-6BMF3QD3.mjs} +1 -1
- package/lib/{chunk-JA5LYEG4.mjs → chunk-6CVNPSI3.mjs} +1 -1
- package/lib/{chunk-SLTXO73P.mjs → chunk-6GGZCKVV.mjs} +5 -3
- package/lib/chunk-6QE3IUXA.mjs +53 -0
- package/lib/{chunk-2CRZJ26O.mjs → chunk-6RNUF4LV.mjs} +1 -1
- package/lib/{chunk-UNUI5GCY.mjs → chunk-76P5II7A.mjs} +6 -6
- package/lib/{chunk-AT5DQ6XT.mjs → chunk-7E4J6YBL.mjs} +1 -1
- package/lib/{chunk-PBPNVWL2.mjs → chunk-7EU3FOC4.mjs} +1 -1
- package/lib/{chunk-RYVNJCJ2.mjs → chunk-7JMUQSV5.mjs} +1 -1
- package/lib/{chunk-FTZRR3K6.mjs → chunk-7LJJ6SKX.mjs} +7 -3
- package/lib/chunk-7NWVVRXM.mjs +63 -0
- package/lib/{chunk-4HVUQDPB.mjs → chunk-7TEPMZRL.mjs} +1 -1
- package/lib/{chunk-JOSZ4COK.mjs → chunk-7VSJ3RTI.mjs} +2 -0
- package/lib/{chunk-L6H74EAQ.mjs → chunk-7WYOWHKR.mjs} +1 -1
- package/lib/chunk-AASRNCVH.mjs +51 -0
- package/lib/{chunk-YGG7NOZ7.mjs → chunk-AEV6FHUQ.mjs} +1 -1
- package/lib/{chunk-SGAZRZIK.mjs → chunk-ALGX47MZ.mjs} +2 -2
- package/lib/{chunk-62D2ZNLD.mjs → chunk-AMGZXLNR.mjs} +1 -1
- package/lib/{chunk-JE2Y3RAL.mjs → chunk-ARA7YCBH.mjs} +1 -1
- package/lib/{chunk-MOXBCNH3.mjs → chunk-ASZC2OSU.mjs} +2 -2
- package/lib/chunk-B6D5UHOQ.mjs +67 -0
- package/lib/{chunk-KQV6UPEF.mjs → chunk-BBXAF6LS.mjs} +7 -3
- package/lib/{chunk-TBFT5WCF.mjs → chunk-BD73QGIH.mjs} +1 -1
- package/lib/{chunk-RZ4YLRVA.mjs → chunk-BIWBGSDJ.mjs} +1 -1
- package/lib/chunk-C3VH34J4.mjs +91 -0
- package/lib/chunk-C4ZXSLQP.mjs +12 -0
- package/lib/{chunk-7GB6GKGD.mjs → chunk-CCIRXOIR.mjs} +53 -29
- package/lib/chunk-CCMHIAAZ.mjs +35 -0
- package/lib/{chunk-HV6TXVFA.mjs → chunk-CD6DMMCL.mjs} +2 -0
- package/lib/{chunk-3PHJRZWE.mjs → chunk-CDK7APZM.mjs} +1 -1
- package/lib/{chunk-AS7NPVSN.mjs → chunk-CJTAJA4V.mjs} +2 -10
- package/lib/{chunk-S7W4ZL46.mjs → chunk-COHZA3Q6.mjs} +1 -1
- package/lib/{chunk-MN7IITZQ.mjs → chunk-CTW5LTU3.mjs} +3 -3
- package/lib/{chunk-GY2RSUAJ.mjs → chunk-CYSI752N.mjs} +2 -2
- package/lib/{chunk-R37XLGXJ.mjs → chunk-D5I42WSS.mjs} +1 -1
- package/lib/{chunk-RPE2LBZM.mjs → chunk-DFR5TVL7.mjs} +1 -1
- package/lib/{chunk-EOGM64YO.mjs → chunk-DOA3WDEF.mjs} +1 -1
- package/lib/chunk-DSY6DDC3.mjs +12 -0
- package/lib/{chunk-LALBHUEG.mjs → chunk-DWZ232Q2.mjs} +22 -7
- package/lib/{chunk-ORDBTUJK.mjs → chunk-DY3O7TP2.mjs} +1 -1
- package/lib/{chunk-GNSLOYT2.mjs → chunk-DYV23SEH.mjs} +4 -4
- package/lib/{chunk-VOIEK4BP.mjs → chunk-DZORJA3B.mjs} +31 -14
- package/lib/{chunk-VI2KFLCZ.mjs → chunk-E4YRRUI3.mjs} +2 -0
- package/lib/{chunk-XZF6TES3.mjs → chunk-E7H2KJ4A.mjs} +1 -1
- package/lib/chunk-EATIRXQK.mjs +11 -0
- package/lib/chunk-ED5NFRNM.mjs +49 -0
- package/lib/{chunk-CIMSFVNA.mjs → chunk-FAKVBDTE.mjs} +4 -3
- package/lib/{chunk-WG6PNVJM.mjs → chunk-FFF7QP5X.mjs} +1 -1
- package/lib/{chunk-Q4IQEMVA.mjs → chunk-FRZM4C7T.mjs} +2 -2
- package/lib/{chunk-TELJAUBZ.mjs → chunk-G2QCDZEE.mjs} +2 -2
- package/lib/chunk-GCIF33S4.mjs +22 -0
- package/lib/{chunk-OVD2WBG7.mjs → chunk-GGTSWVFO.mjs} +1 -1
- package/lib/{chunk-UUKIIB2D.mjs → chunk-GIEAPQ2H.mjs} +5 -5
- package/lib/{chunk-A4UUZNZZ.mjs → chunk-GIHKIRAH.mjs} +3 -3
- package/lib/{chunk-OF3FJXZL.mjs → chunk-HPM5H4HF.mjs} +2 -2
- package/lib/{chunk-GRGNRLCK.mjs → chunk-HSBIO24M.mjs} +40 -30
- package/lib/chunk-HVDDVQIJ.mjs +57 -0
- package/lib/{chunk-JA7KPIAW.mjs → chunk-I3KHCP2X.mjs} +2 -2
- package/lib/chunk-I4RR2QN7.mjs +122 -0
- package/lib/{chunk-YKDJ5C7W.mjs → chunk-I6QAEJTP.mjs} +1 -1
- package/lib/{chunk-636WODA2.mjs → chunk-IHTDJ5DD.mjs} +3 -3
- package/lib/chunk-IN37K4CZ.mjs +113 -0
- package/lib/{chunk-SRZY7O3J.mjs → chunk-IOXFCPJQ.mjs} +5 -5
- package/lib/{chunk-AMKZNB5D.mjs → chunk-IT2ZBSQG.mjs} +3 -3
- package/lib/chunk-JB7AXJFO.mjs +405 -0
- package/lib/chunk-JDLZGLZJ.mjs +87 -0
- package/lib/{chunk-YLNTACMP.mjs → chunk-JIGVLQZM.mjs} +1 -1
- package/lib/{chunk-YIOEE4WJ.mjs → chunk-JPWTOBGP.mjs} +3 -6
- package/lib/chunk-K5D3QU3U.mjs +137 -0
- package/lib/{chunk-4NONUZBG.mjs → chunk-K6DW4JHP.mjs} +1 -1
- package/lib/{chunk-Q6FQTPU4.mjs → chunk-KUVBW2U7.mjs} +3 -3
- package/lib/{chunk-AZVPP2GA.mjs → chunk-KY7T6Q73.mjs} +3 -3
- package/lib/{chunk-RZQA2M2N.mjs → chunk-KYCWE6NL.mjs} +1 -1
- package/lib/{chunk-FSTU72UW.mjs → chunk-LBSTQNK7.mjs} +2 -2
- package/lib/{chunk-JYONTZJI.mjs → chunk-LEXUEUIJ.mjs} +4 -4
- package/lib/chunk-LGL3XQ7F.mjs +1 -0
- package/lib/chunk-LJF3YLMG.mjs +25 -0
- package/lib/{chunk-JZ3SSSRS.mjs → chunk-LOROW3UU.mjs} +3 -2
- package/lib/{chunk-IERXTGCG.mjs → chunk-LQ2EKGFZ.mjs} +4 -4
- package/lib/chunk-M3FKAS2D.mjs +85 -0
- package/lib/chunk-M5W5FRMF.mjs +63 -0
- package/lib/{chunk-K2VWHGPL.mjs → chunk-MAX3RSBG.mjs} +2 -0
- package/lib/{chunk-KNRXLZZP.mjs → chunk-MB55ARZ7.mjs} +1 -1
- package/lib/chunk-MDZE2AV3.mjs +115 -0
- package/lib/{chunk-LAVKSOBD.mjs → chunk-MFPPIGPF.mjs} +2 -1
- package/lib/{chunk-QXMTDX2V.mjs → chunk-MMFURLTB.mjs} +1 -1
- package/lib/chunk-MVQ252OA.mjs +85 -0
- package/lib/{chunk-ELTZ3E3O.mjs → chunk-MZHFYHCF.mjs} +3 -3
- package/lib/{chunk-PFH5M7W4.mjs → chunk-NE4WGXUM.mjs} +1 -1
- package/lib/{chunk-PHH6JAI6.mjs → chunk-NKO25SIM.mjs} +2 -2
- package/lib/chunk-NMYQHE6C.mjs +109 -0
- package/lib/chunk-NRNJCOJP.mjs +73 -0
- package/lib/chunk-NRTMJLXK.mjs +111 -0
- package/lib/chunk-NUSFBDBA.mjs +43 -0
- package/lib/{chunk-TH32WIIV.mjs → chunk-NWBGCS6B.mjs} +1 -1
- package/lib/chunk-O32SL32C.mjs +66 -0
- package/lib/{chunk-4K6XP3WN.mjs → chunk-O72JHAKF.mjs} +1 -1
- package/lib/{chunk-SWFBV5TR.mjs → chunk-OAENQH2X.mjs} +2 -1
- package/lib/chunk-OUYOYTXI.mjs +50 -0
- package/lib/chunk-P3RZGE6X.mjs +39 -0
- package/lib/chunk-P7P7S4GM.mjs +70 -0
- package/lib/chunk-PGXASAXX.mjs +1 -0
- package/lib/{chunk-2QI25H4L.mjs → chunk-POCUFCQC.mjs} +2 -2
- package/lib/chunk-Q3NP4BBO.mjs +105 -0
- package/lib/{chunk-574Q5HPU.mjs → chunk-Q665G2U7.mjs} +3 -3
- package/lib/chunk-QE4JSIR3.mjs +70 -0
- package/lib/chunk-QIEADZWY.mjs +54 -0
- package/lib/{chunk-RDBMQIDN.mjs → chunk-QLJ54D5Q.mjs} +1 -1
- package/lib/{chunk-Z6YBOKUS.mjs → chunk-QNDMUIJM.mjs} +12 -7
- package/lib/chunk-QNTBEAY4.mjs +69 -0
- package/lib/chunk-QOUQNN33.mjs +68 -0
- package/lib/{chunk-FIH3EYH2.mjs → chunk-QTEMHSK5.mjs} +2 -2
- package/lib/{chunk-SYNRLOS5.mjs → chunk-R6JMSH4N.mjs} +6 -6
- package/lib/chunk-RGX6ZWXV.mjs +1 -0
- package/lib/{chunk-ZZRR7QJL.mjs → chunk-RHBTSMCQ.mjs} +1 -8
- package/lib/{chunk-ACSGONQB.mjs → chunk-RVE7QNTO.mjs} +1 -1
- package/lib/{chunk-3XPLPYWH.mjs → chunk-RVU3IPAE.mjs} +1 -1
- package/lib/chunk-RXGITNPE.mjs +39 -0
- package/lib/{chunk-CYNSXZSV.mjs → chunk-RYABO2EX.mjs} +1 -0
- package/lib/{chunk-AOXXQP4V.mjs → chunk-SFIOTEMN.mjs} +4 -6
- package/lib/chunk-SFL4T7RS.mjs +84 -0
- package/lib/{chunk-6MSKYREQ.mjs → chunk-SOPUKVAK.mjs} +1 -1
- package/lib/{chunk-VB44SHZH.mjs → chunk-SQGVYXQT.mjs} +1 -1
- package/lib/{chunk-KBT6E5ZH.mjs → chunk-SX2VUWRF.mjs} +7 -6
- package/lib/{chunk-XQJMHLCD.mjs → chunk-T4AH7FLU.mjs} +2 -2
- package/lib/{chunk-74N7E566.mjs → chunk-T4VM27IJ.mjs} +1 -1
- package/lib/chunk-TBR32D5M.mjs +26 -0
- package/lib/{chunk-WZNAXR6Q.mjs → chunk-TCRJL43C.mjs} +4 -4
- package/lib/{chunk-UMAMF5YJ.mjs → chunk-TPXCSXWT.mjs} +6 -5
- package/lib/chunk-TYVII7EX.mjs +1 -0
- package/lib/{chunk-POM5H35R.mjs → chunk-UC3N6X6R.mjs} +2 -2
- package/lib/chunk-UMI3AJYV.mjs +1 -0
- package/lib/{chunk-H6FVJB5Z.mjs → chunk-UPP3GX33.mjs} +12 -6
- package/lib/{chunk-Q4EJ7LGQ.mjs → chunk-UTXKOHCM.mjs} +5 -6
- package/lib/{chunk-2A6R2TW7.mjs → chunk-V4BZDJSQ.mjs} +1 -1
- package/lib/chunk-VDIATO4X.mjs +51 -0
- package/lib/{chunk-NTS75UVH.mjs → chunk-VDLM4YQP.mjs} +2 -0
- package/lib/{chunk-XYFBDF32.mjs → chunk-VL2UCFFK.mjs} +4 -6
- package/lib/chunk-VZX5PGQL.mjs +28 -0
- package/lib/{chunk-BH5LIONT.mjs → chunk-WB5FKCPB.mjs} +9 -9
- package/lib/{chunk-ZJJ3ISDC.mjs → chunk-WKSI3EP4.mjs} +2 -2
- package/lib/chunk-WLYGSJUB.mjs +1 -0
- package/lib/{chunk-KWHZZUYO.mjs → chunk-WV5PBU2C.mjs} +3 -3
- package/lib/{chunk-2CYVOYRM.mjs → chunk-WVL5S3CD.mjs} +1 -1
- package/lib/{chunk-D7SER4BZ.mjs → chunk-X5HHW5EE.mjs} +4 -4
- package/lib/{chunk-SJ5DUOZ6.mjs → chunk-X67AAUB2.mjs} +1 -1
- package/lib/{chunk-WC3ULY5W.mjs → chunk-XXKEMYTB.mjs} +1 -1
- package/lib/{chunk-PRRXEPHP.mjs → chunk-XZCE64VV.mjs} +1 -1
- package/lib/{chunk-EFTZDOEV.mjs → chunk-Y4CLZAPU.mjs} +2 -2
- package/lib/chunk-Y6VHQF2J.mjs +548 -0
- package/lib/{chunk-R7ZJGYVD.mjs → chunk-Y7WPI233.mjs} +2 -2
- package/lib/{chunk-VWBRZW2B.mjs → chunk-YF74SWNR.mjs} +2 -2
- package/lib/{chunk-MKOK7VNZ.mjs → chunk-YKUYXBXK.mjs} +1 -1
- package/lib/{chunk-TTMI7WFG.mjs → chunk-YR5WZRJD.mjs} +1 -1
- package/lib/{chunk-LQ7MOJFV.mjs → chunk-YSBY3XJC.mjs} +9 -9
- package/lib/{chunk-EQIF6RE5.mjs → chunk-ZEEM3OU3.mjs} +8 -8
- package/lib/{chunk-Y3K4LGOG.mjs → chunk-ZETHVOMR.mjs} +1 -1
- package/lib/chunk-ZJYFDULL.mjs +1 -0
- package/lib/chunk-ZNF2AXYR.mjs +58 -0
- package/lib/chunk-ZRWNSZC6.mjs +56 -0
- package/lib/{chunk-HQXEF7BU.mjs → chunk-ZSBVX26X.mjs} +8 -8
- package/lib/{chunk-AD63JH53.mjs → chunk-ZUSPKNMI.mjs} +1 -1
- package/lib/{chunk-P2RMWELW.mjs → chunk-ZUZ6IVLL.mjs} +1 -1
- package/lib/{chunk-LKS2SY52.mjs → chunk-ZWCLOA5C.mjs} +1 -1
- package/lib/{chunk-4K5SE35T.mjs → chunk-ZX64XZS4.mjs} +1 -1
- package/lib/components/accordion/Accordion.mjs +1 -1
- package/lib/components/accordion/Accordion.native.mjs +1 -1
- package/lib/components/accordion/AccordionProps.d.mts +1 -0
- package/lib/components/accordion/AccordionProps.d.ts +1 -0
- package/lib/components/accordion/index.d.mts +2 -2
- package/lib/components/accordion/index.d.ts +2 -2
- package/lib/components/accordion/index.js +16 -16
- package/lib/components/accordion/index.mjs +1 -1
- package/lib/components/accordion/index.native.js +8 -1
- package/lib/components/accordion/index.native.mjs +7 -7
- package/lib/components/accordion/item/AccordionItem.mjs +1 -1
- package/lib/components/accordion/item/AccordionItem.native.js +8 -1
- package/lib/components/accordion/item/AccordionItem.native.mjs +7 -7
- package/lib/components/accordion/item/AccordionItemProps.d.mts +1 -0
- package/lib/components/accordion/item/AccordionItemProps.d.ts +1 -0
- package/lib/components/accordion/item/body/AccordionBody.mjs +1 -1
- package/lib/components/accordion/item/body/AccordionBody.native.mjs +1 -1
- package/lib/components/accordion/item/body/AccordionBodyProps.d.mts +1 -0
- package/lib/components/accordion/item/body/AccordionBodyProps.d.ts +1 -0
- package/lib/components/accordion/item/body/index.mjs +1 -1
- package/lib/components/accordion/item/body/index.native.mjs +1 -1
- package/lib/components/accordion/item/header/AccordionHeader.mjs +1 -1
- package/lib/components/accordion/item/header/AccordionHeader.native.mjs +1 -1
- package/lib/components/accordion/item/header/AccordionHeaderProps.d.mts +1 -0
- package/lib/components/accordion/item/header/AccordionHeaderProps.d.ts +1 -0
- package/lib/components/accordion/item/header/index.mjs +1 -1
- package/lib/components/accordion/item/header/index.native.mjs +1 -1
- package/lib/components/accordion/item/index.mjs +1 -1
- package/lib/components/accordion/item/index.native.js +8 -1
- package/lib/components/accordion/item/index.native.mjs +7 -7
- package/lib/components/alert/Alert.js +40 -41
- package/lib/components/alert/Alert.mjs +14 -14
- package/lib/components/alert/Alert.native.js +354 -323
- package/lib/components/alert/Alert.native.mjs +20 -21
- package/lib/components/alert/AlertProps.d.mts +1 -0
- package/lib/components/alert/AlertProps.d.ts +1 -0
- package/lib/components/alert/AlertPropsDefaults.js +2 -0
- package/lib/components/alert/ToasterStatusPropsDefaults.js +2 -0
- package/lib/components/alert/context/ToastPropsDefaults.js +2 -0
- package/lib/components/alert/index.d.mts +1 -1
- package/lib/components/alert/index.d.ts +1 -1
- package/lib/components/alert/index.js +40 -41
- package/lib/components/alert/index.mjs +14 -14
- package/lib/components/alert/index.native.js +354 -323
- package/lib/components/alert/index.native.mjs +20 -21
- package/lib/components/autocomplete/AutoComplete.d.mts +1 -1
- package/lib/components/autocomplete/AutoComplete.d.ts +1 -1
- package/lib/components/autocomplete/AutoComplete.js +85 -51
- package/lib/components/autocomplete/AutoComplete.mjs +28 -28
- package/lib/components/autocomplete/AutoComplete.native.js +208 -164
- package/lib/components/autocomplete/AutoComplete.native.mjs +19 -20
- package/lib/components/autocomplete/AutoCompletePropsNativeDefaults.js +11 -0
- package/lib/components/autocomplete/AutoCompletePropsWebDefaults.js +11 -0
- package/lib/components/autocomplete/index.js +85 -53
- package/lib/components/autocomplete/index.mjs +30 -30
- package/lib/components/autocomplete/index.native.js +217 -180
- package/lib/components/autocomplete/index.native.mjs +25 -26
- package/lib/components/autocomplete/item/AutoCompleteIem.native.d.mts +1 -0
- package/lib/components/autocomplete/item/AutoCompleteIem.native.d.ts +1 -0
- package/lib/components/autocomplete/item/AutoCompleteIem.native.js +91 -95
- package/lib/components/autocomplete/item/AutoCompleteIem.native.mjs +6 -7
- package/lib/components/autocomplete/item/AutoCompleteItem.d.mts +1 -0
- package/lib/components/autocomplete/item/AutoCompleteItem.d.ts +1 -0
- package/lib/components/autocomplete/item/AutoCompleteItemProps.d.mts +1 -0
- package/lib/components/autocomplete/item/AutoCompleteItemProps.d.ts +1 -0
- package/lib/components/autocomplete/item/index.mjs +1 -1
- package/lib/components/autocomplete/item/index.native.js +91 -95
- package/lib/components/autocomplete/item/index.native.mjs +6 -7
- package/lib/components/autocomplete/menu/AutoCompleteMenu.d.mts +2 -1
- package/lib/components/autocomplete/menu/AutoCompleteMenu.d.ts +2 -1
- package/lib/components/autocomplete/menu/AutoCompleteMenu.js +1 -8
- package/lib/components/autocomplete/menu/AutoCompleteMenu.mjs +1 -1
- package/lib/components/autocomplete/menu/AutoCompleteMenu.native.d.mts +1 -0
- package/lib/components/autocomplete/menu/AutoCompleteMenu.native.d.ts +1 -0
- package/lib/components/autocomplete/menu/AutoCompleteMenu.native.js +111 -109
- package/lib/components/autocomplete/menu/AutoCompleteMenu.native.mjs +15 -16
- package/lib/components/autocomplete/menu/AutoCompleteMenuProps.d.mts +1 -0
- package/lib/components/autocomplete/menu/AutoCompleteMenuProps.d.ts +1 -0
- package/lib/components/autocomplete/menu/index.js +1 -8
- package/lib/components/autocomplete/menu/index.mjs +2 -2
- package/lib/components/autocomplete/menu/index.native.js +111 -109
- package/lib/components/autocomplete/menu/index.native.mjs +15 -16
- package/lib/components/autolayout/AutoLayout/AutoLayout.native.js +2 -0
- package/lib/components/autolayout/AutoLayout/AutoLayout.native.mjs +3 -3
- package/lib/components/autolayout/AutoLayout/index.native.js +2 -0
- package/lib/components/autolayout/AutoLayout/index.native.mjs +3 -3
- package/lib/components/autolayout/AutoLayoutWrapper/index.native.js +2 -0
- package/lib/components/autolayout/AutoLayoutWrapper/index.native.mjs +4 -4
- package/lib/components/autolayout/SpacingMatrix/index.d.mts +1 -0
- package/lib/components/autolayout/SpacingMatrix/index.d.ts +1 -0
- package/lib/components/autolayout/SpacingMatrix/index.native.d.mts +1 -0
- package/lib/components/autolayout/SpacingMatrix/index.native.d.ts +1 -0
- package/lib/components/autolayout/helpers/AutoLayout.helpers.js +2 -0
- package/lib/components/autolayout/helpers/AutoLayout.helpers.mjs +1 -1
- package/lib/components/autolayout/helpers/AutoLayout.helpers.native.js +2 -0
- package/lib/components/autolayout/helpers/AutoLayout.helpers.native.mjs +2 -2
- package/lib/components/autolayout/index.native.js +2 -0
- package/lib/components/autolayout/index.native.mjs +4 -4
- package/lib/components/autolayout/interface.d.mts +1 -0
- package/lib/components/autolayout/interface.d.ts +1 -0
- package/lib/components/badge/Badge.js +1 -0
- package/lib/components/badge/Badge.mjs +10 -10
- package/lib/components/badge/Badge.native.js +16 -22
- package/lib/components/badge/Badge.native.mjs +13 -14
- package/lib/components/badge/BadgeProps.d.mts +1 -0
- package/lib/components/badge/BadgeProps.d.ts +1 -0
- package/lib/components/badge/index.js +1 -0
- package/lib/components/badge/index.mjs +11 -11
- package/lib/components/badge/index.native.js +16 -22
- package/lib/components/badge/index.native.mjs +13 -14
- package/lib/components/box/Box.js +1 -0
- package/lib/components/box/Box.mjs +5 -5
- package/lib/components/box/Box.native.js +1 -0
- package/lib/components/box/Box.native.mjs +3 -3
- package/lib/components/box/BoxProps.d.mts +1 -0
- package/lib/components/box/BoxProps.d.ts +1 -0
- package/lib/components/box/BoxPropsDefaults.js +4 -0
- package/lib/components/box/content/BoxContent.js +1 -0
- package/lib/components/box/content/BoxContent.mjs +5 -5
- package/lib/components/box/content/BoxContent.native.js +2 -9
- package/lib/components/box/content/BoxContent.native.mjs +3 -3
- package/lib/components/box/content/BoxContentProps.d.mts +1 -0
- package/lib/components/box/content/BoxContentProps.d.ts +1 -0
- package/lib/components/box/content/BoxContentPropsDefaults.js +2 -0
- package/lib/components/box/content/index.js +1 -0
- package/lib/components/box/content/index.mjs +6 -6
- package/lib/components/box/content/index.native.js +2 -9
- package/lib/components/box/content/index.native.mjs +3 -3
- package/lib/components/box/footer/BoxFooter.js +1 -0
- package/lib/components/box/footer/BoxFooter.mjs +5 -5
- package/lib/components/box/footer/BoxFooter.native.js +13 -19
- package/lib/components/box/footer/BoxFooter.native.mjs +13 -14
- package/lib/components/box/footer/BoxFooterProps.d.mts +1 -0
- package/lib/components/box/footer/BoxFooterProps.d.ts +1 -0
- package/lib/components/box/footer/BoxFooterPropsDefaults.js +2 -0
- package/lib/components/box/footer/index.js +1 -0
- package/lib/components/box/footer/index.mjs +6 -6
- package/lib/components/box/footer/index.native.js +13 -19
- package/lib/components/box/footer/index.native.mjs +13 -14
- package/lib/components/box/header/BoxHeader.js +3 -0
- package/lib/components/box/header/BoxHeader.mjs +6 -6
- package/lib/components/box/header/BoxHeader.native.js +1 -0
- package/lib/components/box/header/BoxHeader.native.mjs +3 -3
- package/lib/components/box/header/BoxHeaderProps.d.mts +1 -0
- package/lib/components/box/header/BoxHeaderProps.d.ts +1 -0
- package/lib/components/box/header/BoxHeaderPropsDefaults.js +2 -0
- package/lib/components/box/header/index.js +3 -0
- package/lib/components/box/header/index.mjs +7 -7
- package/lib/components/box/header/index.native.js +1 -0
- package/lib/components/box/header/index.native.mjs +3 -3
- package/lib/components/box/index.js +3 -0
- package/lib/components/box/index.mjs +18 -18
- package/lib/components/box/index.native.js +25 -39
- package/lib/components/box/index.native.mjs +20 -21
- package/lib/components/box/item/BoxItem.mjs +1 -1
- package/lib/components/box/item/BoxItem.native.mjs +1 -1
- package/lib/components/box/item/BoxItemProps.d.mts +1 -0
- package/lib/components/box/item/BoxItemProps.d.ts +1 -0
- package/lib/components/box/item/index.mjs +1 -1
- package/lib/components/box/item/index.native.mjs +1 -1
- package/lib/components/box/table-container/BoxTableContainer.mjs +1 -1
- package/lib/components/box/table-container/BoxTableContainer.native.mjs +1 -1
- package/lib/components/box/table-container/BoxTableContainerProps.d.mts +1 -0
- package/lib/components/box/table-container/BoxTableContainerProps.d.ts +1 -0
- package/lib/components/box/table-container/index.mjs +1 -1
- package/lib/components/box/table-container/index.native.mjs +1 -1
- package/lib/components/breadcrumb/Breadcrumb.mjs +1 -1
- package/lib/components/breadcrumb/Breadcrumb.native.js +8 -1
- package/lib/components/breadcrumb/Breadcrumb.native.mjs +7 -7
- package/lib/components/breadcrumb/BreadcrumbProps.d.mts +1 -0
- package/lib/components/breadcrumb/BreadcrumbProps.d.ts +1 -0
- package/lib/components/breadcrumb/index.js +1 -0
- package/lib/components/breadcrumb/index.mjs +10 -10
- package/lib/components/breadcrumb/index.native.js +69 -70
- package/lib/components/breadcrumb/index.native.mjs +11 -13
- package/lib/components/breadcrumb/item/BreadcrumbItem.js +1 -0
- package/lib/components/breadcrumb/item/BreadcrumbItem.mjs +10 -10
- package/lib/components/breadcrumb/item/BreadcrumbItem.native.js +93 -100
- package/lib/components/breadcrumb/item/BreadcrumbItem.native.mjs +6 -8
- package/lib/components/breadcrumb/item/BreadcrumbItemProps.d.mts +1 -0
- package/lib/components/breadcrumb/item/BreadcrumbItemProps.d.ts +1 -0
- package/lib/components/breadcrumb/item/index.js +1 -0
- package/lib/components/breadcrumb/item/index.mjs +10 -10
- package/lib/components/breadcrumb/item/index.native.js +93 -100
- package/lib/components/breadcrumb/item/index.native.mjs +6 -8
- package/lib/components/button/Button.js +1 -0
- package/lib/components/button/Button.mjs +9 -9
- package/lib/components/button/Button.native.js +107 -108
- package/lib/components/button/Button.native.mjs +14 -16
- package/lib/components/button/ButtonProps.d.mts +1 -0
- package/lib/components/button/ButtonProps.d.ts +1 -0
- package/lib/components/button/ButtonPropsDefaults.js +2 -0
- package/lib/components/button/index.js +1 -0
- package/lib/components/button/index.mjs +9 -9
- package/lib/components/button/index.native.js +110 -111
- package/lib/components/button/index.native.mjs +14 -16
- package/lib/components/button/list/ButtonList.mjs +1 -1
- package/lib/components/button/list/ButtonList.native.mjs +1 -1
- package/lib/components/button/list/ButtonListProps.d.mts +1 -0
- package/lib/components/button/list/ButtonListProps.d.ts +1 -0
- package/lib/components/button/list/index.mjs +1 -1
- package/lib/components/button/list/index.native.mjs +1 -1
- package/lib/components/calendar/Calendar.d.mts +15 -0
- package/lib/components/calendar/Calendar.d.ts +15 -0
- package/lib/components/calendar/Calendar.js +1430 -0
- package/lib/components/calendar/Calendar.mjs +81 -0
- package/lib/components/calendar/Calendar.native.d.mts +3 -0
- package/lib/components/calendar/Calendar.native.d.ts +3 -0
- package/lib/components/calendar/Calendar.native.js +41 -0
- package/lib/components/calendar/Calendar.native.mjs +8 -0
- package/lib/components/calendar/CalendarProps.d.mts +11 -0
- package/lib/components/calendar/CalendarProps.d.ts +11 -0
- package/lib/components/calendar/CalendarProps.js +19 -0
- package/lib/components/calendar/CalendarProps.mjs +2 -0
- package/lib/components/calendar/CalendarPropsDefaults.js +63 -0
- package/lib/components/calendar/index.d.mts +3 -0
- package/lib/components/calendar/index.d.ts +3 -0
- package/lib/components/calendar/index.js +1434 -0
- package/lib/components/calendar/index.mjs +83 -0
- package/lib/components/calendar/index.native.d.mts +3 -0
- package/lib/components/calendar/index.native.d.ts +3 -0
- package/lib/components/calendar/index.native.js +47 -0
- package/lib/components/calendar/index.native.mjs +10 -0
- package/lib/components/card/Card.mjs +1 -1
- package/lib/components/card/Card.native.js +1 -0
- package/lib/components/card/Card.native.mjs +3 -3
- package/lib/components/card/CardProps.d.mts +1 -0
- package/lib/components/card/CardProps.d.ts +1 -0
- package/lib/components/card/content/CardContent.mjs +1 -1
- package/lib/components/card/content/CardContent.native.js +1 -0
- package/lib/components/card/content/CardContent.native.mjs +4 -4
- package/lib/components/card/content/CardContentProps.d.mts +1 -0
- package/lib/components/card/content/CardContentProps.d.ts +1 -0
- package/lib/components/card/content/index.mjs +1 -1
- package/lib/components/card/content/index.native.js +1 -0
- package/lib/components/card/content/index.native.mjs +4 -4
- package/lib/components/card/image/CardImage.mjs +1 -1
- package/lib/components/card/image/CardImage.native.js +1 -0
- package/lib/components/card/image/CardImage.native.mjs +4 -4
- package/lib/components/card/image/index.mjs +1 -1
- package/lib/components/card/image/index.native.js +1 -0
- package/lib/components/card/image/index.native.mjs +4 -4
- package/lib/components/card/index.mjs +2 -2
- package/lib/components/card/index.native.js +1 -0
- package/lib/components/card/index.native.mjs +7 -7
- package/lib/components/checkbox/Checkbox.mjs +1 -1
- package/lib/components/checkbox/Checkbox.native.js +72 -72
- package/lib/components/checkbox/Checkbox.native.mjs +10 -11
- package/lib/components/checkbox/index.js +160 -72
- package/lib/components/checkbox/index.mjs +27 -23
- package/lib/components/checkbox/index.native.js +206 -204
- package/lib/components/checkbox/index.native.mjs +25 -25
- package/lib/components/checkbox/list/CheckboxList.js +98 -20
- package/lib/components/checkbox/list/CheckboxList.mjs +21 -17
- package/lib/components/checkbox/list/CheckboxList.native.d.mts +1 -0
- package/lib/components/checkbox/list/CheckboxList.native.d.ts +1 -0
- package/lib/components/checkbox/list/CheckboxList.native.js +200 -4
- package/lib/components/checkbox/list/CheckboxList.native.mjs +18 -5
- package/lib/components/checkbox/list/CheckboxListProps/index.d.mts +1 -0
- package/lib/components/checkbox/list/CheckboxListProps/index.d.ts +1 -0
- package/lib/components/checkbox/list/CheckboxListProps/index.native.d.mts +2 -0
- package/lib/components/checkbox/list/CheckboxListProps/index.native.d.ts +2 -0
- package/lib/components/checkbox/list/CheckboxListProps.d.mts +27 -0
- package/lib/components/checkbox/list/CheckboxListProps.d.ts +27 -0
- package/lib/components/checkbox/list/CheckboxListProps.js +19 -0
- package/lib/components/checkbox/list/CheckboxListProps.mjs +1 -0
- package/lib/components/checkbox/list/CheckboxListPropsDefaults.js +17 -0
- package/lib/components/checkbox/list/CheckboxListWebPropsDefaults.js +68 -0
- package/lib/components/checkbox/list/index.js +98 -20
- package/lib/components/checkbox/list/index.mjs +21 -17
- package/lib/components/checkbox/list/index.native.js +200 -4
- package/lib/components/checkbox/list/index.native.mjs +18 -5
- package/lib/components/checkbox/tiles/CheckboxTiles.js +3 -1
- package/lib/components/checkbox/tiles/CheckboxTiles.mjs +3 -3
- package/lib/components/checkbox/tiles/CheckboxTiles.native.mjs +3 -3
- package/lib/components/checkbox/tiles/CheckboxTilesProps.d.mts +1 -0
- package/lib/components/checkbox/tiles/CheckboxTilesProps.d.ts +1 -0
- package/lib/components/checkbox/tiles/index.js +3 -1
- package/lib/components/checkbox/tiles/index.mjs +3 -3
- package/lib/components/checkbox/tiles/index.native.mjs +3 -3
- package/lib/components/checkbox/tiles/tile/CheckboxTile.js +26 -17
- package/lib/components/checkbox/tiles/tile/CheckboxTile.mjs +16 -16
- package/lib/components/checkbox/tiles/tile/CheckboxTile.native.d.mts +1 -1
- package/lib/components/checkbox/tiles/tile/CheckboxTile.native.d.ts +1 -1
- package/lib/components/checkbox/tiles/tile/CheckboxTile.native.js +208 -220
- package/lib/components/checkbox/tiles/tile/CheckboxTile.native.mjs +16 -17
- package/lib/components/checkbox/tiles/tile/{CheckboxTileProps.d.mts → CheckboxTileProps/index.d.mts} +5 -4
- package/lib/components/checkbox/tiles/tile/{CheckboxTileProps.d.ts → CheckboxTileProps/index.d.ts} +5 -4
- package/lib/components/checkbox/tiles/tile/{CheckboxTileProps.js → CheckboxTileProps/index.js} +1 -1
- package/lib/components/checkbox/tiles/tile/CheckboxTileProps/index.mjs +2 -0
- package/lib/components/checkbox/tiles/tile/CheckboxTileProps/index.native.d.mts +18 -0
- package/lib/components/checkbox/tiles/tile/CheckboxTileProps/index.native.d.ts +18 -0
- package/lib/components/checkbox/tiles/tile/CheckboxTileProps/index.native.js +19 -0
- package/lib/components/checkbox/tiles/tile/CheckboxTileProps/index.native.mjs +2 -0
- package/lib/components/checkbox/tiles/tile/index.js +26 -17
- package/lib/components/checkbox/tiles/tile/index.mjs +17 -17
- package/lib/components/checkbox/tiles/tile/index.native.d.mts +1 -1
- package/lib/components/checkbox/tiles/tile/index.native.d.ts +1 -1
- package/lib/components/checkbox/tiles/tile/index.native.js +208 -220
- package/lib/components/checkbox/tiles/tile/index.native.mjs +17 -18
- package/lib/components/chips/Chips.mjs +1 -1
- package/lib/components/chips/Chips.native.js +120 -118
- package/lib/components/chips/Chips.native.mjs +10 -11
- package/lib/components/chips/ChipsProps.d.mts +1 -0
- package/lib/components/chips/ChipsProps.d.ts +1 -0
- package/lib/components/chips/index.mjs +1 -1
- package/lib/components/chips/index.native.js +120 -118
- package/lib/components/chips/index.native.mjs +11 -12
- package/lib/components/chips/list/ChipsList.mjs +1 -1
- package/lib/components/chips/list/ChipsList.native.mjs +1 -1
- package/lib/components/chips/list/ChipsListProps.d.mts +1 -0
- package/lib/components/chips/list/ChipsListProps.d.ts +1 -0
- package/lib/components/chips/list/index.mjs +1 -1
- package/lib/components/chips/list/index.native.mjs +1 -1
- package/lib/components/columns/Columns.js +2 -0
- package/lib/components/columns/Columns.mjs +3 -3
- package/lib/components/columns/Columns.native.js +67 -64
- package/lib/components/columns/Columns.native.mjs +4 -4
- package/lib/components/columns/ColumnsProps.d.mts +1 -0
- package/lib/components/columns/ColumnsProps.d.ts +1 -0
- package/lib/components/columns/column/Column.js +2 -0
- package/lib/components/columns/column/Column.mjs +3 -3
- package/lib/components/columns/column/Column.native.d.mts +5 -2
- package/lib/components/columns/column/Column.native.d.ts +5 -2
- package/lib/components/columns/column/Column.native.js +56 -53
- package/lib/components/columns/column/Column.native.mjs +14 -15
- package/lib/components/columns/column/ColumnProps.d.mts +1 -0
- package/lib/components/columns/column/ColumnProps.d.ts +1 -0
- package/lib/components/columns/column/ColumnPropsDefaults.js +14 -14
- package/lib/components/columns/column/index.js +2 -0
- package/lib/components/columns/column/index.mjs +4 -4
- package/lib/components/columns/column/index.native.js +56 -53
- package/lib/components/columns/column/index.native.mjs +14 -15
- package/lib/components/columns/context/index.d.mts +3 -2
- package/lib/components/columns/context/index.d.ts +3 -2
- package/lib/components/columns/context/index.js +3 -2
- package/lib/components/columns/context/index.mjs +1 -1
- package/lib/components/columns/index.js +2 -0
- package/lib/components/columns/index.mjs +5 -5
- package/lib/components/columns/index.native.js +120 -115
- package/lib/components/columns/index.native.mjs +15 -16
- package/lib/components/container/Container.mjs +1 -1
- package/lib/components/container/Container.native.mjs +1 -1
- package/lib/components/container/ContainerProps.d.mts +1 -0
- package/lib/components/container/ContainerProps.d.ts +1 -0
- package/lib/components/container/index.mjs +1 -1
- package/lib/components/container/index.native.mjs +1 -1
- package/lib/components/countdown/Countdown.mjs +1 -1
- package/lib/components/countdown/Countdown.native.js +98 -102
- package/lib/components/countdown/Countdown.native.mjs +6 -7
- package/lib/components/countdown/index.mjs +2 -2
- package/lib/components/countdown/index.native.js +98 -102
- package/lib/components/countdown/index.native.mjs +7 -8
- package/lib/components/datepicker/DatePicker.d.mts +22 -0
- package/lib/components/datepicker/DatePicker.d.ts +22 -0
- package/lib/components/datepicker/DatePicker.js +2356 -0
- package/lib/components/datepicker/DatePicker.mjs +101 -0
- package/lib/components/datepicker/DatePicker.native.d.mts +3 -0
- package/lib/components/datepicker/DatePicker.native.d.ts +3 -0
- package/lib/components/datepicker/DatePicker.native.js +41 -0
- package/lib/components/datepicker/DatePicker.native.mjs +8 -0
- package/lib/components/datepicker/DatePickerEnum.d.mts +7 -0
- package/lib/components/datepicker/DatePickerEnum.d.ts +7 -0
- package/lib/components/datepicker/DatePickerEnum.js +37 -0
- package/lib/components/datepicker/DatePickerEnum.mjs +14 -0
- package/lib/components/datepicker/DatePickerProps.d.mts +37 -0
- package/lib/components/datepicker/DatePickerProps.d.ts +37 -0
- package/lib/components/datepicker/DatePickerProps.js +19 -0
- package/lib/components/datepicker/DatePickerProps.mjs +1 -0
- package/lib/components/datepicker/DatePickerPropsDefaults.js +117 -0
- package/lib/components/datepicker/HandleKeyPressDefaults.js +14 -0
- package/lib/components/datepicker/SegmentDefaults.js +33 -0
- package/lib/components/datepicker/SegmentsDefaults.js +14 -0
- package/lib/components/datepicker/index.d.mts +2 -0
- package/lib/components/datepicker/index.d.ts +2 -0
- package/lib/components/datepicker/index.js +2360 -0
- package/lib/components/datepicker/index.mjs +102 -0
- package/lib/components/datepicker/index.native.d.mts +2 -0
- package/lib/components/datepicker/index.native.d.ts +2 -0
- package/lib/components/datepicker/index.native.js +47 -0
- package/lib/components/datepicker/index.native.mjs +9 -0
- package/lib/components/divider/Divider.js +26 -18
- package/lib/components/divider/Divider.mjs +8 -8
- package/lib/components/divider/Divider.native.js +126 -126
- package/lib/components/divider/Divider.native.mjs +10 -11
- package/lib/components/divider/DividerProps/index.mjs +0 -1
- package/lib/components/divider/DividerProps.d.mts +15 -0
- package/lib/components/divider/DividerProps.d.ts +15 -0
- package/lib/components/divider/DividerProps.js +19 -0
- package/lib/components/divider/DividerProps.mjs +2 -0
- package/lib/components/{checkbox/tiles/tile/CheckboxTilePropsDefaults.js → divider/DividerPropsDefaults.js} +18 -26
- package/lib/components/divider/index.js +26 -18
- package/lib/components/divider/index.mjs +9 -9
- package/lib/components/divider/index.native.js +126 -126
- package/lib/components/divider/index.native.mjs +11 -12
- package/lib/components/enumsComponentsName.d.mts +3 -1
- package/lib/components/enumsComponentsName.d.ts +3 -1
- package/lib/components/enumsComponentsName.js +2 -0
- package/lib/components/enumsComponentsName.mjs +1 -1
- package/lib/components/fab/Fab.js +50 -51
- package/lib/components/fab/Fab.mjs +9 -9
- package/lib/components/fab/Fab.native.js +148 -129
- package/lib/components/fab/Fab.native.mjs +14 -15
- package/lib/components/fab/FabProps.d.mts +1 -0
- package/lib/components/fab/FabProps.d.ts +1 -0
- package/lib/components/fab/FabPropsDefaults.js +2 -0
- package/lib/components/fab/index.js +50 -51
- package/lib/components/fab/index.mjs +9 -9
- package/lib/components/fab/index.native.js +148 -129
- package/lib/components/fab/index.native.mjs +14 -15
- package/lib/components/flex-box/FlexBox.d.mts +3 -2
- package/lib/components/flex-box/FlexBox.d.ts +3 -2
- package/lib/components/flex-box/FlexBox.js +33 -15
- package/lib/components/flex-box/FlexBox.mjs +3 -3
- package/lib/components/flex-box/FlexBox.native.js +137 -130
- package/lib/components/flex-box/FlexBox.native.mjs +16 -17
- package/lib/components/flex-box/FlexBoxProps.d.mts +17 -11
- package/lib/components/flex-box/FlexBoxProps.d.ts +17 -11
- package/lib/components/flex-box/FlexBoxPropsDefaults.js +24 -1
- package/lib/components/flex-box/ResponsiveValueDefaults.js +37 -0
- package/lib/components/flex-box/flex-item/FlexItem.js +4 -2
- package/lib/components/flex-box/flex-item/FlexItem.mjs +3 -3
- package/lib/components/flex-box/flex-item/FlexItem.native.mjs +3 -3
- package/lib/components/flex-box/flex-item/FlexItemProps.d.mts +3 -2
- package/lib/components/flex-box/flex-item/FlexItemProps.d.ts +3 -2
- package/lib/components/flex-box/flex-item/FlexItemPropsDefaults.js +1 -1
- package/lib/components/flex-box/flex-item/FlexSizeDefaults.js +8 -8
- package/lib/components/flex-box/index.js +35 -17
- package/lib/components/flex-box/index.mjs +4 -4
- package/lib/components/flex-box/index.native.js +143 -136
- package/lib/components/flex-box/index.native.mjs +17 -18
- package/lib/components/hero/Hero.d.mts +1 -1
- package/lib/components/hero/Hero.d.ts +1 -1
- package/lib/components/hero/Hero.js +3 -2
- package/lib/components/hero/Hero.mjs +5 -5
- package/lib/components/hero/Hero.native.js +37 -51
- package/lib/components/hero/Hero.native.mjs +18 -19
- package/lib/components/hero/HeroProps.d.mts +1 -0
- package/lib/components/hero/HeroProps.d.ts +1 -0
- package/lib/components/hero/HeroPropsDefaults.js +2 -0
- package/lib/components/hero/index.js +3 -4
- package/lib/components/hero/index.mjs +6 -6
- package/lib/components/hero/index.native.js +37 -51
- package/lib/components/hero/index.native.mjs +19 -20
- package/lib/components/icon/Icon.js +1 -0
- package/lib/components/icon/Icon.mjs +5 -5
- package/lib/components/icon/Icon.native.js +8 -1
- package/lib/components/icon/Icon.native.mjs +4 -4
- package/lib/components/icon/IconNameEnum.d.mts +1 -0
- package/lib/components/icon/IconNameEnum.d.ts +1 -0
- package/lib/components/icon/IconNameEnum.js +1 -0
- package/lib/components/icon/IconNameEnum.mjs +1 -1
- package/lib/components/icon/{IconProps.d.mts → IconProps/index.d.mts} +4 -4
- package/lib/components/icon/{IconProps.d.ts → IconProps/index.d.ts} +4 -4
- package/lib/components/icon/{IconProps.js → IconProps/index.js} +1 -1
- package/lib/components/icon/IconProps/index.mjs +2 -0
- package/lib/components/icon/IconProps/index.native.d.mts +19 -0
- package/lib/components/icon/IconProps/index.native.d.ts +19 -0
- package/lib/components/icon/IconProps/index.native.js +19 -0
- package/lib/components/icon/IconProps/index.native.mjs +2 -0
- package/lib/components/icon/index.js +2 -0
- package/lib/components/icon/index.mjs +7 -7
- package/lib/components/icon/index.native.d.mts +1 -1
- package/lib/components/icon/index.native.d.ts +1 -1
- package/lib/components/icon/index.native.js +9 -1
- package/lib/components/icon/index.native.mjs +6 -6
- package/lib/components/image/Image.d.mts +2 -0
- package/lib/components/image/Image.d.ts +2 -0
- package/lib/components/image/Image.js +44 -33
- package/lib/components/image/Image.mjs +16 -16
- package/lib/components/image/Image.native.d.mts +2 -0
- package/lib/components/image/Image.native.d.ts +2 -0
- package/lib/components/image/Image.native.js +30 -23
- package/lib/components/image/Image.native.mjs +2 -2
- package/lib/components/image/ImageProps.d.mts +3 -1
- package/lib/components/image/ImageProps.d.ts +3 -1
- package/lib/components/image/ImagePropsDefaults.js +9 -0
- package/lib/components/image/index.js +44 -33
- package/lib/components/image/index.mjs +19 -19
- package/lib/components/image/index.native.js +30 -23
- package/lib/components/image/index.native.mjs +2 -2
- package/lib/components/index.d.mts +2 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/index.js +3591 -2602
- package/lib/components/index.mjs +224 -212
- package/lib/components/index.native.d.mts +2 -0
- package/lib/components/index.native.d.ts +2 -0
- package/lib/components/index.native.js +2075 -1963
- package/lib/components/index.native.mjs +214 -209
- package/lib/components/input/ISecurityRulesDefaults.js +23 -0
- package/lib/components/input/Input.d.mts +5 -1
- package/lib/components/input/Input.d.ts +5 -1
- package/lib/components/input/Input.js +80 -41
- package/lib/components/input/Input.mjs +21 -21
- package/lib/components/input/Input.native.d.mts +3 -1
- package/lib/components/input/Input.native.d.ts +3 -1
- package/lib/components/input/Input.native.js +193 -149
- package/lib/components/input/Input.native.mjs +16 -17
- package/lib/components/input/InputProps.d.mts +10 -6
- package/lib/components/input/InputProps.d.ts +10 -6
- package/lib/components/input/InputPropsDefaults.js +11 -0
- package/lib/components/input/gauge/InputGauge.d.mts +5 -2
- package/lib/components/input/gauge/InputGauge.d.ts +5 -2
- package/lib/components/input/gauge/InputGauge.js +72 -42
- package/lib/components/input/gauge/InputGauge.mjs +16 -16
- package/lib/components/input/gauge/InputGauge.native.d.mts +4 -2
- package/lib/components/input/gauge/InputGauge.native.d.ts +4 -2
- package/lib/components/input/gauge/InputGauge.native.js +157 -114
- package/lib/components/input/gauge/InputGauge.native.mjs +15 -16
- package/lib/components/input/gauge/hook/useGauge.d.mts +11 -3
- package/lib/components/input/gauge/hook/useGauge.d.ts +11 -3
- package/lib/components/input/gauge/hook/useGauge.js +80 -62
- package/lib/components/input/gauge/hook/useGauge.mjs +15 -15
- package/lib/components/input/gauge/hook/useGauge.native.d.mts +11 -3
- package/lib/components/input/gauge/hook/useGauge.native.d.ts +11 -3
- package/lib/components/input/gauge/hook/useGauge.native.js +84 -73
- package/lib/components/input/gauge/hook/useGauge.native.mjs +13 -14
- package/lib/components/input/index.js +80 -41
- package/lib/components/input/index.mjs +22 -22
- package/lib/components/input/index.native.js +193 -149
- package/lib/components/input/index.native.mjs +16 -17
- package/lib/components/link/Link.d.mts +1 -0
- package/lib/components/link/Link.d.ts +1 -0
- package/lib/components/link/Link.js +1 -0
- package/lib/components/link/Link.mjs +8 -8
- package/lib/components/link/Link.native.js +8 -1
- package/lib/components/link/Link.native.mjs +7 -7
- package/lib/components/link/LinkDefaults.js +9 -0
- package/lib/components/link/LinkProps.d.mts +1 -0
- package/lib/components/link/LinkProps.d.ts +1 -0
- package/lib/components/link/LinkPropsDefaults.js +9 -0
- package/lib/components/link/LinkPropsNativeDefaults.js +9 -0
- package/lib/components/link/index.js +1 -0
- package/lib/components/link/index.mjs +9 -9
- package/lib/components/link/index.native.js +8 -1
- package/lib/components/link/index.native.mjs +7 -7
- package/lib/components/list/List.js +6 -8
- package/lib/components/list/List.mjs +2 -2
- package/lib/components/list/List.native.mjs +1 -1
- package/lib/components/list/index.js +27 -28
- package/lib/components/list/index.mjs +21 -21
- package/lib/components/list/index.native.js +74 -72
- package/lib/components/list/index.native.mjs +15 -16
- package/lib/components/list/item/ListItem.js +14 -14
- package/lib/components/list/item/ListItem.mjs +16 -16
- package/lib/components/list/item/ListItem.native.js +74 -72
- package/lib/components/list/item/ListItem.native.mjs +14 -15
- package/lib/components/list/item/ListItemPropsDefaults.js +2 -0
- package/lib/components/list/item/description/ListItemDescription.js +7 -6
- package/lib/components/list/item/description/ListItemDescription.mjs +2 -2
- package/lib/components/list/item/description/ListItemDescription.native.d.mts +1 -1
- package/lib/components/list/item/description/ListItemDescription.native.d.ts +1 -1
- package/lib/components/list/item/description/ListItemDescription.native.js +191 -181
- package/lib/components/list/item/description/ListItemDescription.native.mjs +15 -16
- package/lib/components/list/item/description/index.js +7 -6
- package/lib/components/list/item/description/index.mjs +2 -2
- package/lib/components/list/item/description/index.native.js +191 -181
- package/lib/components/list/item/description/index.native.mjs +15 -16
- package/lib/components/list/item/index.js +21 -20
- package/lib/components/list/item/index.mjs +20 -20
- package/lib/components/list/item/index.native.js +74 -72
- package/lib/components/list/item/index.native.mjs +15 -16
- package/lib/components/modal/Modal.js +41 -42
- package/lib/components/modal/Modal.mjs +12 -12
- package/lib/components/modal/Modal.native.js +223 -208
- package/lib/components/modal/Modal.native.mjs +18 -19
- package/lib/components/modal/body/ModalBody.mjs +1 -1
- package/lib/components/modal/body/ModalBody.native.js +17 -23
- package/lib/components/modal/body/ModalBody.native.mjs +13 -14
- package/lib/components/modal/body/ModalBodyProps.d.mts +1 -0
- package/lib/components/modal/body/ModalBodyProps.d.ts +1 -0
- package/lib/components/modal/body/index.native.js +17 -23
- package/lib/components/modal/body/index.native.mjs +13 -14
- package/lib/components/modal/footer/ModalFooter.js +4 -6
- package/lib/components/modal/footer/ModalFooter.mjs +2 -2
- package/lib/components/modal/footer/ModalFooter.native.js +108 -106
- package/lib/components/modal/footer/ModalFooter.native.mjs +15 -16
- package/lib/components/modal/footer/ModalFooterProps.d.mts +1 -0
- package/lib/components/modal/footer/ModalFooterProps.d.ts +1 -0
- package/lib/components/modal/footer/index.native.js +108 -106
- package/lib/components/modal/footer/index.native.mjs +15 -16
- package/lib/components/modal/index.js +45 -48
- package/lib/components/modal/index.mjs +13 -13
- package/lib/components/modal/index.native.js +239 -226
- package/lib/components/modal/index.native.mjs +22 -23
- package/lib/components/otp/Otp.mjs +5 -5
- package/lib/components/otp/Otp.native.js +160 -149
- package/lib/components/otp/Otp.native.mjs +16 -17
- package/lib/components/otp/index.mjs +6 -6
- package/lib/components/otp/index.native.js +160 -149
- package/lib/components/otp/index.native.mjs +16 -17
- package/lib/components/pagination/Pagination.js +83 -76
- package/lib/components/pagination/Pagination.mjs +8 -8
- package/lib/components/pagination/Pagination.native.js +176 -176
- package/lib/components/pagination/Pagination.native.mjs +10 -11
- package/lib/components/pagination/index.js +83 -76
- package/lib/components/pagination/index.mjs +10 -10
- package/lib/components/pagination/index.native.js +176 -176
- package/lib/components/pagination/index.native.mjs +11 -12
- package/lib/components/popover/Popover.d.mts +5 -3
- package/lib/components/popover/Popover.d.ts +5 -3
- package/lib/components/popover/Popover.mjs +1 -1
- package/lib/components/popover/Popover.native.js +83 -91
- package/lib/components/popover/Popover.native.mjs +13 -14
- package/lib/components/popover/index.mjs +1 -1
- package/lib/components/popover/index.native.js +83 -91
- package/lib/components/popover/index.native.mjs +13 -14
- package/lib/components/price/Price.js +1 -0
- package/lib/components/price/Price.mjs +19 -19
- package/lib/components/price/Price.native.js +18 -24
- package/lib/components/price/Price.native.mjs +13 -14
- package/lib/components/price/PriceProps.d.mts +1 -0
- package/lib/components/price/PriceProps.d.ts +1 -0
- package/lib/components/price/index.js +1 -0
- package/lib/components/price/index.mjs +22 -22
- package/lib/components/price/index.native.js +18 -24
- package/lib/components/price/index.native.mjs +14 -15
- package/lib/components/product-tour/ProductTour.js +24 -14
- package/lib/components/product-tour/ProductTour.mjs +9 -9
- package/lib/components/product-tour/ProductTour.native.mjs +1 -1
- package/lib/components/product-tour/ProductTourProps.d.mts +1 -0
- package/lib/components/product-tour/ProductTourProps.d.ts +1 -0
- package/lib/components/product-tour/index.js +24 -14
- package/lib/components/product-tour/index.mjs +9 -9
- package/lib/components/product-tour/index.native.mjs +1 -1
- package/lib/components/progress/Progress.js +31 -32
- package/lib/components/progress/Progress.mjs +19 -19
- package/lib/components/progress/Progress.native.js +190 -180
- package/lib/components/progress/Progress.native.mjs +15 -16
- package/lib/components/progress/ProgressProps/index.d.mts +1 -0
- package/lib/components/progress/ProgressProps/index.d.ts +1 -0
- package/lib/components/progress/ProgressProps/index.native.d.mts +1 -0
- package/lib/components/progress/ProgressProps/index.native.d.ts +1 -0
- package/lib/components/progress/index.js +70 -73
- package/lib/components/progress/index.mjs +26 -26
- package/lib/components/progress/index.native.js +290 -282
- package/lib/components/progress/index.native.mjs +16 -17
- package/lib/components/progress/item/ProgressItem.js +1 -0
- package/lib/components/progress/item/ProgressItem.mjs +16 -16
- package/lib/components/progress/item/ProgressItem.native.mjs +1 -1
- package/lib/components/progress/item/ProgressItemProps/index.d.mts +1 -0
- package/lib/components/progress/item/ProgressItemProps/index.d.ts +1 -0
- package/lib/components/progress/item/ProgressItemProps/index.native.d.mts +1 -0
- package/lib/components/progress/item/ProgressItemProps/index.native.d.ts +1 -0
- package/lib/components/progress/item/index.js +1 -0
- package/lib/components/progress/item/index.mjs +17 -17
- package/lib/components/progress/item/index.native.mjs +1 -1
- package/lib/components/progress/radial/ProgressRadial.js +40 -41
- package/lib/components/progress/radial/ProgressRadial.mjs +7 -7
- package/lib/components/progress/radial/ProgressRadial.native.js +202 -202
- package/lib/components/progress/radial/ProgressRadial.native.mjs +14 -15
- package/lib/components/progress/radial/ProgressRadialProps.d.mts +23 -0
- package/lib/components/progress/radial/ProgressRadialProps.d.ts +23 -0
- package/lib/components/progress/radial/ProgressRadialProps.js +19 -0
- package/lib/components/progress/radial/ProgressRadialProps.mjs +1 -0
- package/lib/components/progress/radial/ProgressRadialPropsDefaults.js +239 -0
- package/lib/components/progress/radial/index.js +40 -41
- package/lib/components/progress/radial/index.mjs +8 -8
- package/lib/components/progress/radial/index.native.js +202 -202
- package/lib/components/progress/radial/index.native.mjs +14 -15
- package/lib/components/progress/radial/item/ProgressRadialItemProps.d.mts +1 -0
- package/lib/components/progress/radial/item/ProgressRadialItemProps.d.ts +1 -0
- package/lib/components/progress/radial/item/ProgressRadialItemPropsDefaults.js +1 -0
- package/lib/components/progress/radial/item/ProgressRadialtem.d.mts +1 -0
- package/lib/components/progress/radial/item/ProgressRadialtem.d.ts +1 -0
- package/lib/components/progress/radial/react-native-circular-progress/AnimatedCircularProgress.d.mts +1 -1
- package/lib/components/progress/radial/react-native-circular-progress/AnimatedCircularProgress.d.ts +1 -1
- package/lib/components/radio/Radio.js +39 -29
- package/lib/components/radio/Radio.mjs +2 -2
- package/lib/components/radio/Radio.native.js +157 -150
- package/lib/components/radio/Radio.native.mjs +14 -15
- package/lib/components/radio/index.js +261 -167
- package/lib/components/radio/index.mjs +26 -22
- package/lib/components/radio/index.native.js +365 -224
- package/lib/components/radio/index.native.mjs +32 -23
- package/lib/components/radio/list/RadioList.js +98 -20
- package/lib/components/radio/list/RadioList.mjs +21 -17
- package/lib/components/radio/list/RadioList.native.d.mts +1 -0
- package/lib/components/radio/list/RadioList.native.d.ts +1 -0
- package/lib/components/radio/list/RadioList.native.js +143 -4
- package/lib/components/radio/list/RadioList.native.mjs +20 -5
- package/lib/components/radio/list/RadioListProps.d.mts +2 -0
- package/lib/components/radio/list/RadioListProps.d.ts +2 -0
- package/lib/components/radio/list/RadioListPropsDefaults.js +7 -0
- package/lib/components/radio/list/RadioListWebPropsDefaults.js +7 -0
- package/lib/components/radio/list/index.js +98 -20
- package/lib/components/radio/list/index.mjs +21 -17
- package/lib/components/radio/list/index.native.js +143 -4
- package/lib/components/radio/list/index.native.mjs +20 -5
- package/lib/components/radio/tiles/RadioTiles.js +51 -50
- package/lib/components/radio/tiles/RadioTiles.mjs +17 -17
- package/lib/components/radio/tiles/RadioTiles.native.js +12 -14
- package/lib/components/radio/tiles/RadioTiles.native.mjs +3 -3
- package/lib/components/radio/tiles/RadioTilesProps.d.mts +1 -0
- package/lib/components/radio/tiles/RadioTilesProps.d.ts +1 -0
- package/lib/components/radio/tiles/index.js +51 -50
- package/lib/components/radio/tiles/index.mjs +17 -17
- package/lib/components/radio/tiles/index.native.js +12 -14
- package/lib/components/radio/tiles/index.native.mjs +3 -3
- package/lib/components/radio/tiles/tile/RadioTile.js +70 -63
- package/lib/components/radio/tiles/tile/RadioTile.mjs +16 -16
- package/lib/components/radio/tiles/tile/RadioTile.native.js +77 -78
- package/lib/components/radio/tiles/tile/RadioTile.native.mjs +15 -17
- package/lib/components/radio/tiles/tile/RadioTileProps.d.mts +1 -0
- package/lib/components/radio/tiles/tile/RadioTileProps.d.ts +1 -0
- package/lib/components/radio/tiles/tile/RadioTilePropsDefaults.js +2 -0
- package/lib/components/radio/tiles/tile/index.js +70 -63
- package/lib/components/radio/tiles/tile/index.mjs +16 -16
- package/lib/components/radio/tiles/tile/index.native.js +77 -78
- package/lib/components/radio/tiles/tile/index.native.mjs +15 -17
- package/lib/components/range/Range.js +1 -0
- package/lib/components/range/Range.mjs +15 -15
- package/lib/components/range/Range.native.js +74 -72
- package/lib/components/range/Range.native.mjs +14 -15
- package/lib/components/range/index.js +1 -0
- package/lib/components/range/index.mjs +15 -15
- package/lib/components/range/index.native.js +74 -72
- package/lib/components/range/index.native.mjs +14 -15
- package/lib/components/rows/Rows.mjs +1 -1
- package/lib/components/rows/Rows.native.mjs +1 -1
- package/lib/components/rows/RowsProps.d.mts +1 -0
- package/lib/components/rows/RowsProps.d.ts +1 -0
- package/lib/components/rows/index.mjs +1 -1
- package/lib/components/rows/index.native.mjs +1 -1
- package/lib/components/rows/row/Row.mjs +1 -1
- package/lib/components/rows/row/Row.native.mjs +1 -1
- package/lib/components/rows/row/RowProps.d.mts +1 -0
- package/lib/components/rows/row/RowProps.d.ts +1 -0
- package/lib/components/rows/row/index.mjs +1 -1
- package/lib/components/rows/row/index.native.mjs +1 -1
- package/lib/components/scroll-view/ScrollView.d.mts +1 -1
- package/lib/components/scroll-view/ScrollView.d.ts +1 -1
- package/lib/components/scroll-view/ScrollView.js +12 -8
- package/lib/components/scroll-view/ScrollView.mjs +16 -16
- package/lib/components/scroll-view/ScrollView.native.js +21 -27
- package/lib/components/scroll-view/ScrollView.native.mjs +13 -14
- package/lib/components/scroll-view/ScrollViewProps.d.mts +1 -0
- package/lib/components/scroll-view/ScrollViewProps.d.ts +1 -0
- package/lib/components/scroll-view/ScrollViewPropsDefaults.js +2 -0
- package/lib/components/scroll-view/index.js +12 -8
- package/lib/components/scroll-view/index.mjs +17 -17
- package/lib/components/scroll-view/index.native.js +21 -27
- package/lib/components/scroll-view/index.native.mjs +13 -14
- package/lib/components/section/Section.js +26 -27
- package/lib/components/section/Section.mjs +16 -16
- package/lib/components/section/Section.native.js +30 -38
- package/lib/components/section/Section.native.mjs +13 -14
- package/lib/components/section/SectionPropsDefaults.js +2 -0
- package/lib/components/section/index.js +26 -27
- package/lib/components/section/index.mjs +16 -16
- package/lib/components/section/index.native.js +30 -38
- package/lib/components/section/index.native.mjs +13 -14
- package/lib/components/segment-control/SegmentControl.js +45 -46
- package/lib/components/segment-control/SegmentControl.mjs +17 -17
- package/lib/components/segment-control/SegmentControl.native.js +250 -242
- package/lib/components/segment-control/SegmentControl.native.mjs +15 -16
- package/lib/components/segment-control/SegmentControlProps.d.mts +1 -0
- package/lib/components/segment-control/SegmentControlProps.d.ts +1 -0
- package/lib/components/segment-control/index.js +45 -46
- package/lib/components/segment-control/index.mjs +20 -20
- package/lib/components/segment-control/index.native.js +298 -286
- package/lib/components/segment-control/index.native.mjs +17 -18
- package/lib/components/segment-control/item/SegmentControlItem.mjs +1 -1
- package/lib/components/segment-control/item/SegmentControlItem.native.js +48 -43
- package/lib/components/segment-control/item/SegmentControlItem.native.mjs +3 -3
- package/lib/components/segment-control/item/SegmentControlItemProps.d.mts +1 -0
- package/lib/components/segment-control/item/SegmentControlItemProps.d.ts +1 -0
- package/lib/components/segment-control/item/index.mjs +1 -1
- package/lib/components/segment-control/item/index.native.js +48 -43
- package/lib/components/segment-control/item/index.native.mjs +3 -3
- package/lib/components/select/PropsDefaults.js +2 -0
- package/lib/components/select/Select.js +80 -41
- package/lib/components/select/Select.mjs +28 -28
- package/lib/components/select/Select.native.js +478 -417
- package/lib/components/select/Select.native.mjs +28 -29
- package/lib/components/select/SelectNativePropsDefaults.js +2 -0
- package/lib/components/select/SelectProps.d.mts +1 -0
- package/lib/components/select/SelectProps.d.ts +1 -0
- package/lib/components/select/SelectPropsDefaults.js +2 -0
- package/lib/components/select/index.js +80 -41
- package/lib/components/select/index.mjs +28 -28
- package/lib/components/select/index.native.js +478 -417
- package/lib/components/select/index.native.mjs +29 -30
- package/lib/components/select/option/SelectOption.js +1 -0
- package/lib/components/select/option/SelectOption.mjs +8 -8
- package/lib/components/select/option/SelectOption.native.js +213 -202
- package/lib/components/select/option/SelectOption.native.mjs +17 -18
- package/lib/components/select/option/SelectOptionPropsDefaults.js +2 -0
- package/lib/components/select/option/index.js +1 -0
- package/lib/components/select/option/index.mjs +10 -10
- package/lib/components/select/option/index.native.js +213 -202
- package/lib/components/select/option/index.native.mjs +18 -19
- package/lib/components/select/web/SelectDynamic.d.mts +1 -1
- package/lib/components/select/web/SelectDynamic.d.ts +1 -1
- package/lib/components/select/web/SelectDynamic.js +80 -41
- package/lib/components/select/web/SelectDynamic.mjs +23 -23
- package/lib/components/select/web/SelectNative.js +80 -41
- package/lib/components/select/web/SelectNative.mjs +28 -28
- package/lib/components/select/web/index.js +80 -41
- package/lib/components/select/web/index.mjs +28 -28
- package/lib/components/spacer/Spacer.mjs +1 -1
- package/lib/components/spacer/Spacer.native.mjs +1 -1
- package/lib/components/spacer/index.mjs +1 -1
- package/lib/components/spacer/index.native.mjs +1 -1
- package/lib/components/stepper/Stepper.mjs +1 -1
- package/lib/components/stepper/Stepper.native.js +71 -69
- package/lib/components/stepper/Stepper.native.mjs +14 -15
- package/lib/components/stepper/StepperProps.d.mts +1 -0
- package/lib/components/stepper/StepperProps.d.ts +1 -0
- package/lib/components/stepper/index.js +17 -18
- package/lib/components/stepper/index.mjs +12 -12
- package/lib/components/stepper/index.native.js +109 -109
- package/lib/components/stepper/index.native.mjs +15 -16
- package/lib/components/stepper/step/Step.js +17 -18
- package/lib/components/stepper/step/Step.mjs +8 -8
- package/lib/components/stepper/step/Step.native.js +48 -56
- package/lib/components/stepper/step/Step.native.mjs +13 -14
- package/lib/components/stepper/step/StepPropsDefaults.js +2 -0
- package/lib/components/stepper/step/index.js +17 -18
- package/lib/components/stepper/step/index.mjs +10 -10
- package/lib/components/stepper/step/index.native.js +48 -56
- package/lib/components/stepper/step/index.native.mjs +13 -14
- package/lib/components/sticker/Sticker.js +26 -17
- package/lib/components/sticker/Sticker.mjs +15 -15
- package/lib/components/sticker/Sticker.native.d.mts +1 -1
- package/lib/components/sticker/Sticker.native.d.ts +1 -1
- package/lib/components/sticker/Sticker.native.js +68 -66
- package/lib/components/sticker/Sticker.native.mjs +14 -15
- package/lib/components/sticker/index.js +26 -17
- package/lib/components/sticker/index.mjs +15 -15
- package/lib/components/sticker/index.native.js +68 -66
- package/lib/components/sticker/index.native.mjs +14 -15
- package/lib/components/switch/Switch.js +70 -74
- package/lib/components/switch/Switch.mjs +15 -15
- package/lib/components/switch/Switch.native.js +57 -57
- package/lib/components/switch/Switch.native.mjs +13 -14
- package/lib/components/switch/index.js +70 -74
- package/lib/components/switch/index.mjs +15 -15
- package/lib/components/switch/index.native.js +57 -57
- package/lib/components/switch/index.native.mjs +13 -14
- package/lib/components/table/Table.mjs +1 -1
- package/lib/components/table/Table.native.js +13 -19
- package/lib/components/table/Table.native.mjs +13 -14
- package/lib/components/table/TableProps.d.mts +1 -0
- package/lib/components/table/TableProps.d.ts +1 -0
- package/lib/components/table/body/TableBody.js +1 -0
- package/lib/components/table/body/TableBody.mjs +5 -5
- package/lib/components/table/body/TableBody.native.mjs +1 -1
- package/lib/components/table/body/TableBodyProps.d.mts +1 -0
- package/lib/components/table/body/TableBodyProps.d.ts +1 -0
- package/lib/components/table/body/TableBodyPropsDefaults.js +4 -0
- package/lib/components/table/body/index.js +1 -0
- package/lib/components/table/body/index.mjs +6 -6
- package/lib/components/table/body/index.native.mjs +1 -1
- package/lib/components/table/head/TableHead.js +1 -0
- package/lib/components/table/head/TableHead.mjs +5 -5
- package/lib/components/table/head/TableHead.native.mjs +1 -1
- package/lib/components/table/head/TableHeadProps.d.mts +1 -0
- package/lib/components/table/head/TableHeadProps.d.ts +1 -0
- package/lib/components/table/head/TableHeadPropsDefaults.js +4 -0
- package/lib/components/table/head/index.js +1 -0
- package/lib/components/table/head/index.mjs +6 -6
- package/lib/components/table/head/index.native.mjs +1 -1
- package/lib/components/table/index.js +1 -0
- package/lib/components/table/index.mjs +12 -12
- package/lib/components/table/index.native.js +189 -168
- package/lib/components/table/index.native.mjs +20 -21
- package/lib/components/table/td/TableTd.mjs +1 -1
- package/lib/components/table/td/TableTd.native.js +13 -19
- package/lib/components/table/td/TableTd.native.mjs +13 -14
- package/lib/components/table/td/TableTdProps.d.mts +1 -0
- package/lib/components/table/td/TableTdProps.d.ts +1 -0
- package/lib/components/table/td/index.mjs +1 -1
- package/lib/components/table/td/index.native.js +13 -19
- package/lib/components/table/td/index.native.mjs +13 -14
- package/lib/components/table/th/TableTh.mjs +1 -1
- package/lib/components/table/th/TableTh.native.js +186 -176
- package/lib/components/table/th/TableTh.native.mjs +15 -16
- package/lib/components/table/th/TableThProps.d.mts +1 -0
- package/lib/components/table/th/TableThProps.d.ts +1 -0
- package/lib/components/table/th/index.mjs +1 -1
- package/lib/components/table/th/index.native.js +186 -176
- package/lib/components/table/th/index.native.mjs +15 -16
- package/lib/components/table/tr/TableTr.js +1 -0
- package/lib/components/table/tr/TableTr.mjs +4 -4
- package/lib/components/table/tr/TableTr.native.js +174 -153
- package/lib/components/table/tr/TableTr.native.mjs +15 -16
- package/lib/components/table/tr/TableTrProps.d.mts +1 -0
- package/lib/components/table/tr/TableTrProps.d.ts +1 -0
- package/lib/components/table/tr/TableTrPropsWebDefaults.js +2 -0
- package/lib/components/table/tr/index.js +1 -0
- package/lib/components/table/tr/index.mjs +5 -5
- package/lib/components/table/tr/index.native.js +174 -153
- package/lib/components/table/tr/index.native.mjs +15 -16
- package/lib/components/tabs/Tabs.d.mts +1 -1
- package/lib/components/tabs/Tabs.d.ts +1 -1
- package/lib/components/tabs/Tabs.js +2 -1
- package/lib/components/tabs/Tabs.mjs +3 -3
- package/lib/components/tabs/Tabs.native.js +5 -3
- package/lib/components/tabs/Tabs.native.mjs +3 -3
- package/lib/components/tabs/TabsProps.d.mts +1 -0
- package/lib/components/tabs/TabsProps.d.ts +1 -0
- package/lib/components/tabs/context/index.d.mts +1 -0
- package/lib/components/tabs/context/index.d.ts +1 -0
- package/lib/components/tabs/context/index.js +2 -1
- package/lib/components/tabs/context/index.mjs +1 -1
- package/lib/components/tabs/index.js +13 -11
- package/lib/components/tabs/index.mjs +17 -17
- package/lib/components/tabs/index.native.js +135 -111
- package/lib/components/tabs/index.native.mjs +19 -20
- package/lib/components/tabs/tab-list/TabList.js +5 -1
- package/lib/components/tabs/tab-list/TabList.mjs +12 -12
- package/lib/components/tabs/tab-list/TabList.native.js +120 -97
- package/lib/components/tabs/tab-list/TabList.native.mjs +16 -17
- package/lib/components/tabs/tab-list/TabListProps.d.mts +1 -0
- package/lib/components/tabs/tab-list/TabListProps.d.ts +1 -0
- package/lib/components/tabs/tab-list/index.js +5 -1
- package/lib/components/tabs/tab-list/index.mjs +12 -12
- package/lib/components/tabs/tab-list/index.native.js +120 -97
- package/lib/components/tabs/tab-list/index.native.mjs +16 -17
- package/lib/components/tabs/tab-list/tab/Tab.js +3 -1
- package/lib/components/tabs/tab-list/tab/Tab.mjs +10 -10
- package/lib/components/tabs/tab-list/tab/Tab.native.js +91 -73
- package/lib/components/tabs/tab-list/tab/Tab.native.mjs +11 -12
- package/lib/components/tabs/tab-list/tab/TabProps.d.mts +1 -0
- package/lib/components/tabs/tab-list/tab/TabProps.d.ts +1 -0
- package/lib/components/tabs/tab-list/tab/TabPropsDefaults.js +2 -0
- package/lib/components/tabs/tab-list/tab/index.js +3 -1
- package/lib/components/tabs/tab-list/tab/index.mjs +10 -10
- package/lib/components/tabs/tab-list/tab/index.native.js +91 -73
- package/lib/components/tabs/tab-list/tab/index.native.mjs +11 -12
- package/lib/components/tabs/tab-panels/TabPanels.js +10 -11
- package/lib/components/tabs/tab-panels/TabPanels.mjs +5 -5
- package/lib/components/tabs/tab-panels/TabPanels.native.js +18 -23
- package/lib/components/tabs/tab-panels/TabPanels.native.mjs +15 -16
- package/lib/components/tabs/tab-panels/TabPanelsProps.d.mts +1 -0
- package/lib/components/tabs/tab-panels/TabPanelsProps.d.ts +1 -0
- package/lib/components/tabs/tab-panels/index.js +10 -11
- package/lib/components/tabs/tab-panels/index.mjs +5 -5
- package/lib/components/tabs/tab-panels/index.native.js +18 -23
- package/lib/components/tabs/tab-panels/index.native.mjs +15 -16
- package/lib/components/tabs/tab-panels/tab-panel/TabPanel.js +2 -1
- package/lib/components/tabs/tab-panels/tab-panel/TabPanel.mjs +3 -3
- package/lib/components/tabs/tab-panels/tab-panel/TabPanel.native.js +2 -1
- package/lib/components/tabs/tab-panels/tab-panel/TabPanel.native.mjs +3 -3
- package/lib/components/tabs/tab-panels/tab-panel/TabPanelProps.d.mts +1 -0
- package/lib/components/tabs/tab-panels/tab-panel/TabPanelProps.d.ts +1 -0
- package/lib/components/tabs/tab-panels/tab-panel/index.js +2 -1
- package/lib/components/tabs/tab-panels/tab-panel/index.mjs +4 -4
- package/lib/components/tabs/tab-panels/tab-panel/index.native.js +2 -1
- package/lib/components/tabs/tab-panels/tab-panel/index.native.mjs +3 -3
- package/lib/components/tag/Tag.js +2 -4
- package/lib/components/tag/Tag.mjs +8 -8
- package/lib/components/tag/Tag.native.js +34 -3
- package/lib/components/tag/Tag.native.mjs +8 -8
- package/lib/components/tag/TagPropsDefaults.js +1 -0
- package/lib/components/tag/index.js +2 -4
- package/lib/components/tag/index.mjs +21 -21
- package/lib/components/tag/index.native.d.mts +1 -1
- package/lib/components/tag/index.native.d.ts +1 -1
- package/lib/components/tag/index.native.js +64 -197
- package/lib/components/tag/index.native.mjs +13 -63
- package/lib/components/tag/list/TagList.js +1 -0
- package/lib/components/tag/list/TagList.mjs +15 -15
- package/lib/components/tag/list/TagList.native.js +2 -1
- package/lib/components/tag/list/TagList.native.mjs +2 -2
- package/lib/components/tag/list/TagListProps.d.mts +1 -0
- package/lib/components/tag/list/TagListProps.d.ts +1 -0
- package/lib/components/tag/list/index.js +1 -0
- package/lib/components/tag/list/index.mjs +15 -15
- package/lib/components/tag/list/index.native.js +2 -1
- package/lib/components/tag/list/index.native.mjs +4 -6
- package/lib/components/text/Text.mjs +1 -1
- package/lib/components/text/Text.native.js +89 -93
- package/lib/components/text/Text.native.mjs +5 -6
- package/lib/components/text/TextProps.d.mts +1 -0
- package/lib/components/text/TextProps.d.ts +1 -0
- package/lib/components/text/index.mjs +1 -1
- package/lib/components/text/index.native.js +89 -93
- package/lib/components/text/index.native.mjs +5 -6
- package/lib/components/textarea/Textarea.js +1 -0
- package/lib/components/textarea/Textarea.mjs +19 -19
- package/lib/components/textarea/Textarea.native.js +77 -75
- package/lib/components/textarea/Textarea.native.mjs +14 -15
- package/lib/components/textarea/index.js +1 -0
- package/lib/components/textarea/index.mjs +19 -19
- package/lib/components/textarea/index.native.js +77 -75
- package/lib/components/textarea/index.native.mjs +14 -15
- package/lib/components/timeline/Timeline.mjs +1 -1
- package/lib/components/timeline/Timeline.native.mjs +1 -1
- package/lib/components/timeline/TimelineProps.d.mts +1 -0
- package/lib/components/timeline/TimelineProps.d.ts +1 -0
- package/lib/components/timeline/content/TimelineContent.js +1 -0
- package/lib/components/timeline/content/TimelineContent.mjs +11 -11
- package/lib/components/timeline/content/TimelineContent.native.js +82 -78
- package/lib/components/timeline/content/TimelineContent.native.mjs +18 -19
- package/lib/components/timeline/content/TimelineContentProps.d.mts +1 -0
- package/lib/components/timeline/content/TimelineContentProps.d.ts +1 -0
- package/lib/components/timeline/content/index.js +1 -0
- package/lib/components/timeline/content/index.mjs +12 -12
- package/lib/components/timeline/content/index.native.js +82 -78
- package/lib/components/timeline/content/index.native.mjs +18 -19
- package/lib/components/timeline/index.js +21 -18
- package/lib/components/timeline/index.mjs +17 -17
- package/lib/components/timeline/index.native.js +116 -114
- package/lib/components/timeline/index.native.mjs +20 -21
- package/lib/components/timeline/item/TimelineItem.js +8 -10
- package/lib/components/timeline/item/TimelineItem.mjs +2 -2
- package/lib/components/timeline/item/TimelineItem.native.mjs +1 -1
- package/lib/components/timeline/item/TimelineItemProps.d.mts +1 -0
- package/lib/components/timeline/item/TimelineItemProps.d.ts +1 -0
- package/lib/components/timeline/item/index.js +8 -10
- package/lib/components/timeline/item/index.mjs +3 -3
- package/lib/components/timeline/item/index.native.mjs +1 -1
- package/lib/components/timeline/marker/TimelineMarker.js +13 -8
- package/lib/components/timeline/marker/TimelineMarker.mjs +8 -8
- package/lib/components/timeline/marker/TimelineMarker.native.js +44 -52
- package/lib/components/timeline/marker/TimelineMarker.native.mjs +13 -14
- package/lib/components/timeline/marker/TimelineMarkerPropsDefaults.js +2 -0
- package/lib/components/timeline/marker/TimelineMarkerWebPropsDefaults.js +2 -0
- package/lib/components/timeline/marker/index.js +13 -8
- package/lib/components/timeline/marker/index.mjs +10 -10
- package/lib/components/timeline/marker/index.native.js +44 -52
- package/lib/components/timeline/marker/index.native.mjs +14 -15
- package/lib/components/title/Title.js +39 -41
- package/lib/components/title/Title.mjs +2 -2
- package/lib/components/title/Title.native.js +95 -91
- package/lib/components/title/Title.native.mjs +13 -14
- package/lib/components/title/TitleProps.d.mts +1 -0
- package/lib/components/title/TitleProps.d.ts +1 -0
- package/lib/components/title/index.js +39 -41
- package/lib/components/title/index.mjs +3 -3
- package/lib/components/title/index.native.js +95 -91
- package/lib/components/title/index.native.mjs +14 -15
- package/lib/components/view/View.js +92 -90
- package/lib/components/view/View.mjs +16 -16
- package/lib/components/view/View.native.js +86 -84
- package/lib/components/view/View.native.mjs +13 -14
- package/lib/components/view/ViewProps/index.d.mts +1 -0
- package/lib/components/view/ViewProps/index.d.ts +1 -0
- package/lib/components/view/ViewProps/index.native.d.mts +1 -0
- package/lib/components/view/ViewProps/index.native.d.ts +1 -0
- package/lib/components/view/index.js +92 -90
- package/lib/components/view/index.mjs +19 -19
- package/lib/components/view/index.native.js +86 -84
- package/lib/components/view/index.native.mjs +13 -14
- package/lib/context/provider/index.d.mts +6 -6
- package/lib/context/provider/index.d.ts +6 -6
- package/lib/context/provider/index.js +2 -2
- package/lib/context/provider/index.mjs +3 -3
- package/lib/context/providerStates/index.d.mts +1 -0
- package/lib/context/providerStates/index.d.ts +1 -0
- package/lib/context/providerStyled/index.js +1 -1
- package/lib/context/providerStyled/index.mjs +1 -1
- package/lib/context/providerTheme/index.d.mts +1 -1
- package/lib/context/providerTheme/index.d.ts +1 -1
- package/lib/context/providerTheme/index.native.js +1 -0
- package/lib/context/providerTheme/index.native.mjs +1 -1
- package/lib/context/test/provider.test.js +13 -48
- package/lib/context/test/provider.test.mjs +14 -49
- package/lib/events/OnChangeEvent/index.d.mts +1 -0
- package/lib/events/OnChangeEvent/index.d.ts +1 -0
- package/lib/events/OnClickEvent/index.d.mts +1 -0
- package/lib/events/OnClickEvent/index.d.ts +1 -0
- package/lib/helpers/clickOutside/index.d.mts +1 -0
- package/lib/helpers/clickOutside/index.d.ts +1 -0
- package/lib/helpers/clickOutside/index.js +45 -0
- package/lib/helpers/clickOutside/index.mjs +8 -0
- package/lib/index.js +3612 -2621
- package/lib/index.mjs +242 -230
- package/lib/index.native.js +2128 -1987
- package/lib/index.native.mjs +222 -217
- package/lib/objects/Typography/TypographyBold/index.d.mts +1 -1
- package/lib/objects/Typography/TypographyBold/index.d.ts +1 -1
- package/lib/objects/Typography/TypographyBold/index.native.d.mts +1 -1
- package/lib/objects/Typography/TypographyBold/index.native.d.ts +1 -1
- package/lib/objects/Typography/TypographyBold/index.native.js +1 -0
- package/lib/objects/Typography/TypographyBold/index.native.mjs +2 -2
- package/lib/objects/Typography/TypographyColor/index.js +1 -0
- package/lib/objects/Typography/TypographyColor/index.mjs +2 -2
- package/lib/objects/Typography/TypographyColor/index.native.js +1 -0
- package/lib/objects/Typography/TypographyColor/index.native.mjs +2 -2
- package/lib/objects/Typography/index.d.mts +4 -4
- package/lib/objects/Typography/index.d.ts +4 -4
- package/lib/objects/Typography/index.js +1 -0
- package/lib/objects/Typography/index.mjs +8 -8
- package/lib/objects/Typography/index.native.d.mts +1 -1
- package/lib/objects/Typography/index.native.d.ts +1 -1
- package/lib/objects/Typography/index.native.js +50 -62
- package/lib/objects/Typography/index.native.mjs +7 -8
- package/lib/objects/atoms/Background/index.js +1 -0
- package/lib/objects/atoms/Background/index.mjs +2 -2
- package/lib/objects/atoms/Background/index.native.js +1 -0
- package/lib/objects/atoms/Background/index.native.mjs +2 -2
- package/lib/objects/atoms/index.js +1 -0
- package/lib/objects/atoms/index.mjs +3 -3
- package/lib/objects/atoms/index.native.js +1 -0
- package/lib/objects/atoms/index.native.mjs +2 -2
- package/lib/objects/facets/Alignable/index.js +2 -0
- package/lib/objects/facets/Alignable/index.mjs +1 -1
- package/lib/objects/facets/ChildrenWithNoText/index.d.mts +1 -0
- package/lib/objects/facets/ChildrenWithNoText/index.d.ts +1 -0
- package/lib/objects/facets/Color/index.d.mts +2 -1
- package/lib/objects/facets/Color/index.d.ts +2 -1
- package/lib/objects/facets/Color/index.js +2 -0
- package/lib/objects/facets/Color/index.mjs +1 -1
- package/lib/objects/facets/Color/index.native.d.mts +2 -1
- package/lib/objects/facets/Color/index.native.d.ts +2 -1
- package/lib/objects/facets/Color/index.native.js +2 -0
- package/lib/objects/facets/Color/index.native.mjs +1 -1
- package/lib/objects/facets/Direction/index.d.mts +3 -1
- package/lib/objects/facets/Direction/index.d.ts +3 -1
- package/lib/objects/facets/Direction/index.js +2 -0
- package/lib/objects/facets/Direction/index.mjs +1 -1
- package/lib/objects/facets/Status/index.js +1 -0
- package/lib/objects/facets/Status/index.mjs +8 -8
- package/lib/objects/facets/Status/index.native.js +8 -1
- package/lib/objects/facets/Status/index.native.mjs +7 -7
- package/lib/objects/facets/Variant/index.js +1 -0
- package/lib/objects/facets/Variant/index.mjs +2 -2
- package/lib/objects/facets/Variant/index.native.js +1 -0
- package/lib/objects/facets/Variant/index.native.mjs +2 -2
- package/lib/objects/facets/index.d.mts +7 -7
- package/lib/objects/facets/index.d.ts +7 -7
- package/lib/objects/facets/index.js +133 -127
- package/lib/objects/facets/index.mjs +11 -11
- package/lib/objects/facets/index.native.js +13 -1
- package/lib/objects/facets/index.native.mjs +10 -10
- package/lib/objects/index.js +128 -122
- package/lib/objects/index.mjs +21 -21
- package/lib/objects/index.native.js +16 -17
- package/lib/objects/index.native.mjs +17 -18
- package/lib/version.d.mts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.json +1 -1
- package/lib/version.mjs +1 -1
- package/package.json +4 -4
- package/lib/chunk-22ZF6KCV.mjs +0 -71
- package/lib/chunk-2AL4D3MJ.mjs +0 -77
- package/lib/chunk-4XLHP4FT.mjs +0 -30
- package/lib/chunk-5GUDIPAN.mjs +0 -25
- package/lib/chunk-5RU72DNI.mjs +0 -109
- package/lib/chunk-6NWZNU3P.mjs +0 -31
- package/lib/chunk-6QPU3LHF.mjs +0 -42
- package/lib/chunk-7O3FYPFV.mjs +0 -42
- package/lib/chunk-ABKYP5IV.mjs +0 -28
- package/lib/chunk-AK2SCURT.mjs +0 -105
- package/lib/chunk-CJHW2V6H.mjs +0 -150
- package/lib/chunk-CWX2XNZI.mjs +0 -92
- package/lib/chunk-DXSXX5ZX.mjs +0 -27
- package/lib/chunk-FUE3HEEY.mjs +0 -115
- package/lib/chunk-G2RSK6RU.mjs +0 -60
- package/lib/chunk-GPYOBQ3V.mjs +0 -99
- package/lib/chunk-GYARTTY2.mjs +0 -41
- package/lib/chunk-HLTY5AJR.mjs +0 -43
- package/lib/chunk-HPICKTAC.mjs +0 -62
- package/lib/chunk-I54USHWW.mjs +0 -72
- package/lib/chunk-JMC4JQWZ.mjs +0 -46
- package/lib/chunk-K5BZA4Y4.mjs +0 -88
- package/lib/chunk-KX2KTYWH.mjs +0 -38
- package/lib/chunk-L3A2G234.mjs +0 -43
- package/lib/chunk-LBCAAKRZ.mjs +0 -103
- package/lib/chunk-MDNN7KMA.mjs +0 -52
- package/lib/chunk-MK63OCEA.mjs +0 -91
- package/lib/chunk-MRVKCNOC.mjs +0 -41
- package/lib/chunk-O2QP75YD.mjs +0 -37
- package/lib/chunk-PBCERB3A.mjs +0 -90
- package/lib/chunk-QP3ACDAG.mjs +0 -58
- package/lib/chunk-REG3H3QQ.mjs +0 -86
- package/lib/chunk-RJ2IH6RX.mjs +0 -53
- package/lib/chunk-RXN7VI6G.mjs +0 -55
- package/lib/chunk-S2DOOAGV.mjs +0 -89
- package/lib/chunk-SKSWO5HE.mjs +0 -54
- package/lib/chunk-SPYC565D.mjs +0 -139
- package/lib/chunk-T4P4VEOQ.mjs +0 -34
- package/lib/chunk-TB5FNQJR.mjs +0 -87
- package/lib/chunk-UV7KNMPY.mjs +0 -50
- package/lib/chunk-UWF5SZJY.mjs +0 -59
- package/lib/chunk-UXXUYCZ5.mjs +0 -65
- package/lib/chunk-VAWKAIZG.mjs +0 -59
- package/lib/chunk-VECADRWL.mjs +0 -75
- package/lib/chunk-WM3KXXQX.mjs +0 -58
- package/lib/chunk-XPCXYBYT.mjs +0 -29
- package/lib/components/checkbox/tiles/tile/CheckboxTileProps.mjs +0 -2
- package/lib/components/flex-box/DirectionDefaults.js +0 -32
- package/lib/components/flex-box/FlexBoxSizeDefaults.js +0 -53
- package/lib/components/icon/IconProps.mjs +0 -2
- package/lib/components/icon/IconPropsDefaults.js +0 -187
- package/lib/components/input/InputNativePropsDefaults.js +0 -662
- package/lib/components/input/InputPropDefaults.js +0 -676
- package/lib/{chunk-YK5HPRX4.mjs → chunk-2K2TD7FH.mjs} +0 -0
- package/lib/{chunk-S3BT5JEK.mjs → chunk-3QR4ZVH4.mjs} +0 -0
- package/lib/{chunk-IK3CWSC6.mjs → chunk-4DZWJDF4.mjs} +0 -0
- package/lib/{chunk-GBY3HXT4.mjs → chunk-56UCSXNY.mjs} +0 -0
- package/lib/{chunk-E6IYXJ2R.mjs → chunk-GVFOBKEF.mjs} +0 -0
- package/lib/{chunk-XP4NKGQY.mjs → chunk-WC7HZXMT.mjs} +3 -3
|
@@ -0,0 +1,2360 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
|
|
31
|
+
// components/datepicker/index.ts
|
|
32
|
+
var datepicker_exports = {};
|
|
33
|
+
__export(datepicker_exports, {
|
|
34
|
+
DatePicker: () => DatePicker_default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(datepicker_exports);
|
|
37
|
+
|
|
38
|
+
// context/index.tsx
|
|
39
|
+
var React = __toESM(require("react"));
|
|
40
|
+
var TrilogyContext = React.createContext({
|
|
41
|
+
styled: false,
|
|
42
|
+
setStyled: () => void 0
|
|
43
|
+
});
|
|
44
|
+
var useTrilogyContext = () => {
|
|
45
|
+
const context = React.useContext(TrilogyContext);
|
|
46
|
+
if (context === void 0) {
|
|
47
|
+
throw new Error("useTrilogyContext must be used within a TrilogyProvider");
|
|
48
|
+
}
|
|
49
|
+
return context;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// helpers/hashClassesHelpers/index.tsx
|
|
53
|
+
var hashClass = (addHash = false, classes) => {
|
|
54
|
+
const { hash, styled } = useTrilogyContext();
|
|
55
|
+
if (classes.trim().length < 1) return "";
|
|
56
|
+
if (styled) {
|
|
57
|
+
return classes.split(" ").map((classe) => classe = `${classe}_${hash}`).join(" ");
|
|
58
|
+
}
|
|
59
|
+
return classes;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// helpers/device/index.ts
|
|
63
|
+
var Device = /* @__PURE__ */ ((Device2) => {
|
|
64
|
+
Device2["Browser"] = "browser";
|
|
65
|
+
Device2["Server"] = "server";
|
|
66
|
+
Device2["Native"] = "native";
|
|
67
|
+
return Device2;
|
|
68
|
+
})(Device || {});
|
|
69
|
+
var { Browser, Server, Native } = Device;
|
|
70
|
+
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
71
|
+
var canUseNative = typeof navigator != "undefined" && navigator.product == "ReactNative";
|
|
72
|
+
var device = canUseNative ? Native : canUseDOM ? Browser : Server;
|
|
73
|
+
var SSRObjectDefined = {
|
|
74
|
+
isBrowser: device === Browser,
|
|
75
|
+
isServer: device === Server,
|
|
76
|
+
isNative: device === Native,
|
|
77
|
+
device,
|
|
78
|
+
canUseWorkers: typeof Worker !== "undefined",
|
|
79
|
+
canUseEventListeners: device === Browser && !!window.addEventListener,
|
|
80
|
+
canUseViewport: device === Browser && !!window.screen
|
|
81
|
+
};
|
|
82
|
+
var assign = (...args) => Object.assign({}, ...args);
|
|
83
|
+
var values = (obj) => Object.values(obj);
|
|
84
|
+
var toArrayObject = () => assign((values(SSRObjectDefined), SSRObjectDefined));
|
|
85
|
+
var SSRObject = toArrayObject();
|
|
86
|
+
|
|
87
|
+
// services/classify/index.ts
|
|
88
|
+
function classify(prefix) {
|
|
89
|
+
return (classname) => classname !== "" ? `${prefix}-${classname.toLowerCase()}` : "";
|
|
90
|
+
}
|
|
91
|
+
var is = classify("is");
|
|
92
|
+
var has = classify("has");
|
|
93
|
+
|
|
94
|
+
// components/calendar/Calendar.tsx
|
|
95
|
+
var import_locales2 = require("@trilogy-ds/locales");
|
|
96
|
+
var import_clsx8 = __toESM(require("clsx"));
|
|
97
|
+
var import_react9 = __toESM(require("react"));
|
|
98
|
+
|
|
99
|
+
// context/providerTheme/index.tsx
|
|
100
|
+
var import_react = __toESM(require("react"));
|
|
101
|
+
var defaultTheme = {
|
|
102
|
+
icons: {},
|
|
103
|
+
colors: {},
|
|
104
|
+
fontFamily: {}
|
|
105
|
+
};
|
|
106
|
+
var defaultContextValue = {
|
|
107
|
+
theme: defaultTheme,
|
|
108
|
+
setTheme: () => void 0
|
|
109
|
+
};
|
|
110
|
+
var TrilogyThemeContext = import_react.default.createContext(defaultContextValue);
|
|
111
|
+
|
|
112
|
+
// objects/facets/Color/index.tsx
|
|
113
|
+
var import_react2 = require("react");
|
|
114
|
+
var colors = {
|
|
115
|
+
["WHITE" /* BACKGROUND */]: ["#fff", "white", "main"],
|
|
116
|
+
["MAIN" /* MAIN */]: ["#3d5d7e", "main", "white"],
|
|
117
|
+
["MAIN_FADE" /* MAIN_FADE */]: ["#BBC6CD", "main-fade", "white"],
|
|
118
|
+
["ACCENT" /* ACCENT */]: ["#da641b", "accent", "white"],
|
|
119
|
+
["ACCENT_FADE" /* ACCENT_FADE */]: ["#faebe3", "accent-fade", "white"],
|
|
120
|
+
["FONT" /* FONT */]: ["#3d5d7e", "main", "white"],
|
|
121
|
+
["FONT_PLACEHOLDER" /* FONT_PLACEHOLDER */]: ["#687a87", "font-placeholder", "white"],
|
|
122
|
+
["SUCCESS" /* SUCCESS */]: ["#007B52", "success", "white"],
|
|
123
|
+
["SUCCESS_FADE" /* SUCCESS_FADE */]: ["#cae8ca", "success-fade", "white"],
|
|
124
|
+
["INFO" /* INFO */]: ["#1A688A", "info", "white"],
|
|
125
|
+
["INFO_FADE" /* INFO_FADE */]: ["#c8dbec", "info-fade", "white"],
|
|
126
|
+
["WARNING" /* WARNING */]: ["#FFBB33", "warning", "white"],
|
|
127
|
+
["WARNING_FADE" /* WARNING_FADE */]: ["#ecdbc6", "warning-fade", "white"],
|
|
128
|
+
["ERROR" /* ERROR */]: ["#D42D02", "error", "white"],
|
|
129
|
+
["ERROR_FADE" /* ERROR_FADE */]: ["#eecccc", "error-fade", "white"],
|
|
130
|
+
["DISABLED" /* DISABLED */]: ["#646464", "disabled", "white"],
|
|
131
|
+
["DISABLED_FADE" /* DISABLED_FADE */]: ["#D1D1D1", "disabled-fade", "white"],
|
|
132
|
+
["NEUTRAL" /* NEUTRAL */]: ["#707070", "grey", "white"],
|
|
133
|
+
["NEUTRAL_FADE" /* NEUTRAL_FADE */]: ["#F4F4F4", "grey-fade", "white"],
|
|
134
|
+
["STROKE" /* STROKE */]: ["#BBC1CE", "stroke", "white"]
|
|
135
|
+
};
|
|
136
|
+
var getColorClassName = (trilogyColor) => {
|
|
137
|
+
const color = colors[trilogyColor];
|
|
138
|
+
return color[1];
|
|
139
|
+
};
|
|
140
|
+
var getButtonVariantClassName = (trilogyColor) => {
|
|
141
|
+
switch (trilogyColor) {
|
|
142
|
+
case "CONVERSION":
|
|
143
|
+
return "conversion";
|
|
144
|
+
case "PRIMARY":
|
|
145
|
+
return "primary";
|
|
146
|
+
case "SECONDARY":
|
|
147
|
+
return "secondary";
|
|
148
|
+
case "GHOST":
|
|
149
|
+
return "ghost";
|
|
150
|
+
case "SUCCESS":
|
|
151
|
+
return "success";
|
|
152
|
+
case "INFO":
|
|
153
|
+
return "info";
|
|
154
|
+
case "WARNING":
|
|
155
|
+
return "warning";
|
|
156
|
+
case "ERROR":
|
|
157
|
+
return "error";
|
|
158
|
+
case "DISABLED":
|
|
159
|
+
return "disabled";
|
|
160
|
+
default:
|
|
161
|
+
return "primary";
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
var getColorStyle = (trilogyColor) => {
|
|
165
|
+
if (typeof navigator !== "undefined" && navigator.userAgent === void 0) {
|
|
166
|
+
const { theme } = (0, import_react2.useContext)(TrilogyThemeContext);
|
|
167
|
+
const colorsStyle = (theme == null ? void 0 : theme.colors) || colors;
|
|
168
|
+
const colorArray = colorsStyle[trilogyColor] || colorsStyle.default;
|
|
169
|
+
if (trilogyColor === "transparent") return "transparent";
|
|
170
|
+
if (!trilogyColor || !colors[trilogyColor]) {
|
|
171
|
+
return colorsStyle.default;
|
|
172
|
+
}
|
|
173
|
+
return colorArray[0];
|
|
174
|
+
} else {
|
|
175
|
+
if (trilogyColor === "transparent") return "transparent";
|
|
176
|
+
return colors[trilogyColor][0] || colors["MAIN" /* MAIN */][0];
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// objects/atoms/Background/index.ts
|
|
181
|
+
var getBackgroundClassName = (backgroundType) => {
|
|
182
|
+
return `background-${getColorClassName(backgroundType)}`;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
// objects/facets/Justifiable/index.ts
|
|
186
|
+
var getJustifiedClassName = (justifyContent) => {
|
|
187
|
+
switch (justifyContent) {
|
|
188
|
+
case "ALIGNED_CENTER":
|
|
189
|
+
return "justified-center";
|
|
190
|
+
case "ALIGNED_START":
|
|
191
|
+
return "justified-start";
|
|
192
|
+
case "ALIGNED_END":
|
|
193
|
+
return "justified-end";
|
|
194
|
+
default:
|
|
195
|
+
return "justified-start";
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
var getJustifySelfClassName = (justifyContent) => {
|
|
199
|
+
switch (justifyContent) {
|
|
200
|
+
case "ALIGNED_CENTER":
|
|
201
|
+
return "justified-self-center";
|
|
202
|
+
case "ALIGNED_START":
|
|
203
|
+
return "justified-self-start";
|
|
204
|
+
case "ALIGNED_END":
|
|
205
|
+
return "justified-selfend";
|
|
206
|
+
default:
|
|
207
|
+
return "justified-selfstart";
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// components/icon/Icon.tsx
|
|
212
|
+
var import_clsx = __toESM(require("clsx"));
|
|
213
|
+
var React3 = __toESM(require("react"));
|
|
214
|
+
var Icon = React3.forwardRef(
|
|
215
|
+
({ className, id, size, name, circled, stretched, color, backgroundColor, onClick, skeleton, align, ...others }, ref) => {
|
|
216
|
+
const { styled } = useTrilogyContext();
|
|
217
|
+
const background = backgroundColor && has(getBackgroundClassName(backgroundColor)) || circled && has(getBackgroundClassName("MAIN" /* MAIN */)) || "";
|
|
218
|
+
const classes = hashClass(
|
|
219
|
+
styled,
|
|
220
|
+
(0, import_clsx.default)(
|
|
221
|
+
"icon",
|
|
222
|
+
stretched && is("stretched"),
|
|
223
|
+
size && is(size),
|
|
224
|
+
circled && is("circled"),
|
|
225
|
+
circled && !color && has("text-white"),
|
|
226
|
+
color && is(`${getColorClassName(color)}`),
|
|
227
|
+
skeleton && is("loading"),
|
|
228
|
+
align && (0, import_clsx.default)(is("flex"), is(getJustifySelfClassName(align))),
|
|
229
|
+
background,
|
|
230
|
+
className
|
|
231
|
+
)
|
|
232
|
+
);
|
|
233
|
+
return /* @__PURE__ */ React3.createElement("span", { id, onClick: onClick && onClick, className: classes, ...others, ref }, /* @__PURE__ */ React3.createElement("i", { className: hashClass(styled, (0, import_clsx.default)(name)), "aria-hidden": "true" }));
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
Icon.displayName = "Icon" /* Icon */;
|
|
237
|
+
var Icon_default = Icon;
|
|
238
|
+
|
|
239
|
+
// components/select/Select.tsx
|
|
240
|
+
var React11 = __toESM(require("react"));
|
|
241
|
+
|
|
242
|
+
// components/select/context/index.tsx
|
|
243
|
+
var import_react3 = __toESM(require("react"));
|
|
244
|
+
var SelectContext = import_react3.default.createContext({
|
|
245
|
+
selectedOptionValues: [],
|
|
246
|
+
multiple: false,
|
|
247
|
+
custom: false,
|
|
248
|
+
isVisibleOptions: false,
|
|
249
|
+
setIsVisibleOptions: () => false,
|
|
250
|
+
setSelectedOptionValues: () => []
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// components/select/web/SelectDynamic.tsx
|
|
254
|
+
var import_clsx5 = __toESM(require("clsx"));
|
|
255
|
+
var import_react8 = __toESM(require("react"));
|
|
256
|
+
var import_react_dom = __toESM(require("react-dom"));
|
|
257
|
+
|
|
258
|
+
// components/input/Input.tsx
|
|
259
|
+
var import_locales = require("@trilogy-ds/locales");
|
|
260
|
+
var import_clsx4 = __toESM(require("clsx"));
|
|
261
|
+
var import_react7 = __toESM(require("react"));
|
|
262
|
+
|
|
263
|
+
// components/text/Text.tsx
|
|
264
|
+
var React5 = __toESM(require("react"));
|
|
265
|
+
var import_clsx2 = __toESM(require("clsx"));
|
|
266
|
+
|
|
267
|
+
// components/text/TextEnum.ts
|
|
268
|
+
var TextMarkup = /* @__PURE__ */ ((TextMarkup2) => {
|
|
269
|
+
TextMarkup2["P"] = "p";
|
|
270
|
+
TextMarkup2["SPAN"] = "span";
|
|
271
|
+
return TextMarkup2;
|
|
272
|
+
})(TextMarkup || {});
|
|
273
|
+
|
|
274
|
+
// components/text/Text.tsx
|
|
275
|
+
var Text = React5.forwardRef(({
|
|
276
|
+
level,
|
|
277
|
+
markup,
|
|
278
|
+
children,
|
|
279
|
+
className,
|
|
280
|
+
id,
|
|
281
|
+
typo,
|
|
282
|
+
inverted,
|
|
283
|
+
skeleton,
|
|
284
|
+
accessibilityLabel,
|
|
285
|
+
marginless,
|
|
286
|
+
numberOfLines,
|
|
287
|
+
...others
|
|
288
|
+
}, ref) => {
|
|
289
|
+
const { styled } = useTrilogyContext();
|
|
290
|
+
const levelText = () => {
|
|
291
|
+
if (level) {
|
|
292
|
+
switch (level) {
|
|
293
|
+
case 1 /* ONE */:
|
|
294
|
+
return is("level-1");
|
|
295
|
+
case 2 /* TWO */:
|
|
296
|
+
return is("level-2");
|
|
297
|
+
case 3 /* THREE */:
|
|
298
|
+
return is("level-3");
|
|
299
|
+
case 4 /* FOUR */:
|
|
300
|
+
return is("level-4");
|
|
301
|
+
default:
|
|
302
|
+
return is(`level-${level}`);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
const classes = hashClass(
|
|
307
|
+
styled,
|
|
308
|
+
(0, import_clsx2.default)(
|
|
309
|
+
"text",
|
|
310
|
+
level && levelText(),
|
|
311
|
+
inverted && is("inverted"),
|
|
312
|
+
typo,
|
|
313
|
+
skeleton && is("loading"),
|
|
314
|
+
marginless && is("marginless"),
|
|
315
|
+
numberOfLines && is("text-ellipsis"),
|
|
316
|
+
className
|
|
317
|
+
)
|
|
318
|
+
);
|
|
319
|
+
const isCorrectMarkup2 = (stringMarkup) => {
|
|
320
|
+
if (stringMarkup in TextMarkup || Object.values(TextMarkup).includes(stringMarkup)) return true;
|
|
321
|
+
};
|
|
322
|
+
const Tag = markup && isCorrectMarkup2(markup) ? markup : "p";
|
|
323
|
+
return /* @__PURE__ */ React5.createElement(
|
|
324
|
+
Tag,
|
|
325
|
+
{
|
|
326
|
+
ref,
|
|
327
|
+
id,
|
|
328
|
+
style: numberOfLines ? { WebkitLineClamp: numberOfLines } : {},
|
|
329
|
+
"aria-label": accessibilityLabel,
|
|
330
|
+
className: classes,
|
|
331
|
+
...others
|
|
332
|
+
},
|
|
333
|
+
children
|
|
334
|
+
);
|
|
335
|
+
});
|
|
336
|
+
Text.displayName = "Text" /* Text */;
|
|
337
|
+
var Text_default = Text;
|
|
338
|
+
|
|
339
|
+
// objects/facets/Status/index.ts
|
|
340
|
+
var STATUS_COLORS = {
|
|
341
|
+
SUCCESS: { color: "SUCCESS" /* SUCCESS */, backgroundColor: "SUCCESS_FADE" /* SUCCESS_FADE */ },
|
|
342
|
+
INFO: { color: "INFO" /* INFO */, backgroundColor: "INFO_FADE" /* INFO_FADE */ },
|
|
343
|
+
WARNING: { color: "WARNING" /* WARNING */, backgroundColor: "WARNING_FADE" /* WARNING_FADE */ },
|
|
344
|
+
ERROR: { color: "ERROR" /* ERROR */, backgroundColor: "ERROR_FADE" /* ERROR_FADE */ },
|
|
345
|
+
DEFAULT: { color: "MAIN" /* MAIN */, backgroundColor: "MAIN_FADE" /* MAIN_FADE */ }
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
// objects/Typography/TypographyBold/index.tsx
|
|
349
|
+
var import_react4 = require("react");
|
|
350
|
+
|
|
351
|
+
// components/input/gauge/InputGauge.tsx
|
|
352
|
+
var import_clsx3 = __toESM(require("clsx"));
|
|
353
|
+
var import_react6 = __toESM(require("react"));
|
|
354
|
+
|
|
355
|
+
// components/input/gauge/hook/useGauge.tsx
|
|
356
|
+
var import_react5 = __toESM(require("react"));
|
|
357
|
+
var useGauge = ({ validationRules, inputValue, securityRules }) => {
|
|
358
|
+
var _a, _b;
|
|
359
|
+
const [points, setPoints] = import_react5.default.useState(0);
|
|
360
|
+
const initStateVerifies = { isVerify: false, color: "NEUTRAL" /* NEUTRAL */ };
|
|
361
|
+
const [isLengthVerify, setIsLengthVerify] = import_react5.default.useState(initStateVerifies);
|
|
362
|
+
const [isSpecialCharsVerify, setIsSpecialCharsVerify] = import_react5.default.useState(initStateVerifies);
|
|
363
|
+
const [isNumberVerify, setIsNumberVerify] = import_react5.default.useState(initStateVerifies);
|
|
364
|
+
const [isUppercaseVerify, setIsUppercaseVerify] = import_react5.default.useState(initStateVerifies);
|
|
365
|
+
const [isLowerercaseVerify, setisLowerercaseVerify] = import_react5.default.useState(initStateVerifies);
|
|
366
|
+
const nbAllVerifies = import_react5.default.useMemo(
|
|
367
|
+
() => validationRules && Object.values(validationRules).filter((rule) => rule).length || securityRules && securityRules.length || 0,
|
|
368
|
+
[validationRules, securityRules]
|
|
369
|
+
);
|
|
370
|
+
const rules = import_react5.default.useMemo(
|
|
371
|
+
() => securityRules && securityRules.map(({ label, patternValidator, dataAttribute }) => ({
|
|
372
|
+
label,
|
|
373
|
+
validate: !!(patternValidator == null ? void 0 : patternValidator.test(inputValue)),
|
|
374
|
+
dataAttribute
|
|
375
|
+
})),
|
|
376
|
+
[inputValue, securityRules]
|
|
377
|
+
);
|
|
378
|
+
const calcPoints = import_react5.default.useMemo(() => {
|
|
379
|
+
if (validationRules) {
|
|
380
|
+
return Number((points / nbAllVerifies * 100).toFixed(0));
|
|
381
|
+
}
|
|
382
|
+
if (securityRules) {
|
|
383
|
+
const pts = (rules == null ? void 0 : rules.filter((rule) => rule.validate).length) || 0;
|
|
384
|
+
return Number((pts / nbAllVerifies * 100).toFixed(0));
|
|
385
|
+
}
|
|
386
|
+
return 0;
|
|
387
|
+
}, [points, nbAllVerifies, rules, validationRules, securityRules]);
|
|
388
|
+
const widthGauge = import_react5.default.useMemo(() => {
|
|
389
|
+
if (calcPoints <= 50 && calcPoints > 0) return "50%";
|
|
390
|
+
if (calcPoints <= 99 && calcPoints > 50) return "75%";
|
|
391
|
+
if (calcPoints === 100) return "100%";
|
|
392
|
+
return "0%";
|
|
393
|
+
}, [calcPoints, nbAllVerifies]);
|
|
394
|
+
const colorGauge = () => {
|
|
395
|
+
if (calcPoints <= 50 && calcPoints > 0) return getColorStyle("ERROR" /* ERROR */);
|
|
396
|
+
if (calcPoints <= 99 && calcPoints > 50) return getColorStyle("WARNING" /* WARNING */);
|
|
397
|
+
if (calcPoints === 100) return getColorStyle("SUCCESS" /* SUCCESS */);
|
|
398
|
+
return getColorStyle("NEUTRAL_FADE" /* NEUTRAL_FADE */);
|
|
399
|
+
};
|
|
400
|
+
const LengthvalidationRulesText = (0, import_react5.useMemo)(() => {
|
|
401
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
402
|
+
switch (true) {
|
|
403
|
+
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):
|
|
404
|
+
return `Entre ${(_g = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _g.min} et ${(_h = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _h.max} caract\xE8res`;
|
|
405
|
+
case (((_c = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _c.min) && !((_d = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _d.max)):
|
|
406
|
+
return `Minimum ${(_i = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _i.min} caract\xE8res`;
|
|
407
|
+
case (((_e = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _e.max) && !((_f = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _f.min)):
|
|
408
|
+
return `Maximum ${(_j = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _j.max} caract\xE8res`;
|
|
409
|
+
default:
|
|
410
|
+
return "";
|
|
411
|
+
}
|
|
412
|
+
}, [(_a = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _a.min, (_b = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _b.max]);
|
|
413
|
+
(0, import_react5.useEffect)(() => {
|
|
414
|
+
var _a2, _b2;
|
|
415
|
+
const min = ((_a2 = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _a2.min) || 0;
|
|
416
|
+
const max = ((_b2 = validationRules == null ? void 0 : validationRules.length) == null ? void 0 : _b2.max) || "";
|
|
417
|
+
const regex = new RegExp(`^.{${min},${max}}$`);
|
|
418
|
+
const validations = [];
|
|
419
|
+
(validationRules == null ? void 0 : validationRules.specialChars) && validations.push({ test: /[^\w]/.test(inputValue), setState: setIsSpecialCharsVerify });
|
|
420
|
+
(validationRules == null ? void 0 : validationRules.number) && validations.push({ test: /[0-9]/.test(inputValue), setState: setIsNumberVerify });
|
|
421
|
+
(validationRules == null ? void 0 : validationRules.uppercase) && validations.push({ test: /[A-Z]/.test(inputValue), setState: setIsUppercaseVerify });
|
|
422
|
+
(validationRules == null ? void 0 : validationRules.lowercase) && validations.push({ test: /[a-z]/.test(inputValue), setState: setisLowerercaseVerify });
|
|
423
|
+
(validationRules == null ? void 0 : validationRules.length) && validations.push({ test: regex.test(inputValue), setState: setIsLengthVerify });
|
|
424
|
+
validations.forEach(({ test, setState }) => {
|
|
425
|
+
if (test) return setState({ isVerify: true, color: "SUCCESS" /* SUCCESS */ });
|
|
426
|
+
return setState(initStateVerifies);
|
|
427
|
+
});
|
|
428
|
+
setPoints(validations.filter((item) => item.test).length);
|
|
429
|
+
}, [inputValue, validationRules]);
|
|
430
|
+
return {
|
|
431
|
+
LengthvalidationRulesText,
|
|
432
|
+
colorGauge,
|
|
433
|
+
widthGauge,
|
|
434
|
+
isLengthVerify,
|
|
435
|
+
isLowerercaseVerify,
|
|
436
|
+
isNumberVerify,
|
|
437
|
+
isSpecialCharsVerify,
|
|
438
|
+
isUppercaseVerify,
|
|
439
|
+
rules
|
|
440
|
+
};
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
// components/input/gauge/InputGauge.tsx
|
|
444
|
+
var InputGauge = ({ validationRules, styled, inputValue, securityRules }) => {
|
|
445
|
+
const id = (0, import_react6.useId)();
|
|
446
|
+
const {
|
|
447
|
+
widthGauge,
|
|
448
|
+
colorGauge,
|
|
449
|
+
LengthvalidationRulesText,
|
|
450
|
+
isLengthVerify,
|
|
451
|
+
isLowerercaseVerify,
|
|
452
|
+
isNumberVerify,
|
|
453
|
+
isSpecialCharsVerify,
|
|
454
|
+
isUppercaseVerify,
|
|
455
|
+
rules
|
|
456
|
+
} = useGauge({ validationRules, inputValue, securityRules });
|
|
457
|
+
return /* @__PURE__ */ import_react6.default.createElement("div", { "data-testid": "security-gauge", className: hashClass(styled, (0, import_clsx3.default)("security-gauge-container")) }, /* @__PURE__ */ import_react6.default.createElement("div", { className: hashClass(styled, (0, import_clsx3.default)("security-gauge")) }, /* @__PURE__ */ import_react6.default.createElement(
|
|
458
|
+
"div",
|
|
459
|
+
{
|
|
460
|
+
"data-gauge": true,
|
|
461
|
+
style: { width: widthGauge, backgroundColor: colorGauge() },
|
|
462
|
+
className: hashClass(styled, (0, import_clsx3.default)("gauge"))
|
|
463
|
+
}
|
|
464
|
+
)), /* @__PURE__ */ import_react6.default.createElement("div", { className: hashClass(styled, (0, import_clsx3.default)("security-gauge-verifies")) }, validationRules && /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement(
|
|
465
|
+
DataVerify,
|
|
466
|
+
{
|
|
467
|
+
display: !!(validationRules == null ? void 0 : validationRules.length),
|
|
468
|
+
dataAttribute: { "data-security-length": true },
|
|
469
|
+
type: LengthvalidationRulesText,
|
|
470
|
+
classes: "security-length",
|
|
471
|
+
color: isLengthVerify.color,
|
|
472
|
+
iconName: isLengthVerify.isVerify ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
473
|
+
styled
|
|
474
|
+
}
|
|
475
|
+
), /* @__PURE__ */ import_react6.default.createElement(
|
|
476
|
+
DataVerify,
|
|
477
|
+
{
|
|
478
|
+
display: !!(validationRules == null ? void 0 : validationRules.uppercase),
|
|
479
|
+
dataAttribute: { "data-security-uppercase": true },
|
|
480
|
+
classes: "security-uppercase",
|
|
481
|
+
type: "Majuscule",
|
|
482
|
+
color: isUppercaseVerify.color,
|
|
483
|
+
iconName: isUppercaseVerify.isVerify ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
484
|
+
styled
|
|
485
|
+
}
|
|
486
|
+
), /* @__PURE__ */ import_react6.default.createElement(
|
|
487
|
+
DataVerify,
|
|
488
|
+
{
|
|
489
|
+
display: !!(validationRules == null ? void 0 : validationRules.specialChars),
|
|
490
|
+
dataAttribute: { "data-security-special-chars": true },
|
|
491
|
+
classes: "security-special-chars",
|
|
492
|
+
type: "Caract\xE8res sp\xE9ciaux",
|
|
493
|
+
color: isSpecialCharsVerify.color,
|
|
494
|
+
iconName: isSpecialCharsVerify.isVerify ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
495
|
+
styled
|
|
496
|
+
}
|
|
497
|
+
), /* @__PURE__ */ import_react6.default.createElement(
|
|
498
|
+
DataVerify,
|
|
499
|
+
{
|
|
500
|
+
display: !!(validationRules == null ? void 0 : validationRules.lowercase),
|
|
501
|
+
dataAttribute: { "data-security-lowercase": true },
|
|
502
|
+
classes: "security-lowercase",
|
|
503
|
+
type: "Minuscule",
|
|
504
|
+
color: isLowerercaseVerify.color,
|
|
505
|
+
iconName: isLowerercaseVerify.isVerify ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
506
|
+
styled
|
|
507
|
+
}
|
|
508
|
+
), /* @__PURE__ */ import_react6.default.createElement(
|
|
509
|
+
DataVerify,
|
|
510
|
+
{
|
|
511
|
+
display: !!(validationRules == null ? void 0 : validationRules.number),
|
|
512
|
+
dataAttribute: { "data-security-number": true },
|
|
513
|
+
classes: "security-number",
|
|
514
|
+
type: "Chiffre",
|
|
515
|
+
color: isNumberVerify.color,
|
|
516
|
+
iconName: isNumberVerify.isVerify ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
517
|
+
styled
|
|
518
|
+
}
|
|
519
|
+
)), securityRules && rules && rules.map((rule) => /* @__PURE__ */ import_react6.default.createElement(
|
|
520
|
+
DataVerify,
|
|
521
|
+
{
|
|
522
|
+
key: `${id}_${rule.label}`,
|
|
523
|
+
display: true,
|
|
524
|
+
type: rule.label,
|
|
525
|
+
color: rule.validate ? "SUCCESS" /* SUCCESS */ : "NEUTRAL" /* NEUTRAL */,
|
|
526
|
+
iconName: rule.validate ? "tri-check-circle" /* CHECK_CIRCLE */ : "tri-times" /* TIMES */,
|
|
527
|
+
styled,
|
|
528
|
+
dataAttribute: rule.dataAttribute
|
|
529
|
+
}
|
|
530
|
+
))));
|
|
531
|
+
};
|
|
532
|
+
var DataVerify = ({
|
|
533
|
+
dataAttribute,
|
|
534
|
+
type,
|
|
535
|
+
display,
|
|
536
|
+
color,
|
|
537
|
+
iconName,
|
|
538
|
+
classes,
|
|
539
|
+
styled
|
|
540
|
+
}) => {
|
|
541
|
+
if (!display) return null;
|
|
542
|
+
return /* @__PURE__ */ import_react6.default.createElement("div", { ...dataAttribute, className: hashClass(styled, (0, import_clsx3.default)("security", classes)) }, /* @__PURE__ */ import_react6.default.createElement(Icon_default, { color, name: iconName, size: "smaller" /* SMALLER */ }), /* @__PURE__ */ import_react6.default.createElement("span", null, type));
|
|
543
|
+
};
|
|
544
|
+
var InputGauge_default = InputGauge;
|
|
545
|
+
|
|
546
|
+
// components/input/Input.tsx
|
|
547
|
+
var Input = import_react7.default.forwardRef(
|
|
548
|
+
({
|
|
549
|
+
forceControl,
|
|
550
|
+
label,
|
|
551
|
+
sample,
|
|
552
|
+
className,
|
|
553
|
+
id = import_react7.default.useId(),
|
|
554
|
+
disabled,
|
|
555
|
+
onChange,
|
|
556
|
+
onKeyPress,
|
|
557
|
+
onKeyUp,
|
|
558
|
+
onIconClick,
|
|
559
|
+
onClick,
|
|
560
|
+
onFocus,
|
|
561
|
+
onBlur,
|
|
562
|
+
patternValidator,
|
|
563
|
+
onMouseEnter,
|
|
564
|
+
onMouseLeave,
|
|
565
|
+
name,
|
|
566
|
+
placeholder,
|
|
567
|
+
type = "text" /* TEXT */,
|
|
568
|
+
defaultValue,
|
|
569
|
+
value,
|
|
570
|
+
loading,
|
|
571
|
+
focused,
|
|
572
|
+
status,
|
|
573
|
+
help,
|
|
574
|
+
onStatusChange,
|
|
575
|
+
customValidator,
|
|
576
|
+
onSubmit,
|
|
577
|
+
minLength,
|
|
578
|
+
maxLength,
|
|
579
|
+
accessibilityLabel,
|
|
580
|
+
autoCompleteType,
|
|
581
|
+
iconNameLeft,
|
|
582
|
+
iconNameRight,
|
|
583
|
+
securityGauge,
|
|
584
|
+
validationRules,
|
|
585
|
+
securityRules,
|
|
586
|
+
required,
|
|
587
|
+
readOnly,
|
|
588
|
+
autoCapitalize,
|
|
589
|
+
...others
|
|
590
|
+
}, ref) => {
|
|
591
|
+
const { styled } = useTrilogyContext();
|
|
592
|
+
const idHelp = (0, import_react7.useId)();
|
|
593
|
+
const idSample = (0, import_react7.useId)();
|
|
594
|
+
const inputIcon = /* @__PURE__ */ new Map();
|
|
595
|
+
inputIcon.set("success" /* SUCCESS */, "tri-check-circle" /* CHECK_CIRCLE */);
|
|
596
|
+
inputIcon.set("warning" /* WARNING */, "tri-exclamation-circle" /* EXCLAMATION_CIRCLE */);
|
|
597
|
+
inputIcon.set("error" /* ERROR */, "tri-exclamation-circle" /* EXCLAMATION_CIRCLE */);
|
|
598
|
+
const [_value, setValue] = (0, import_react7.useState)(defaultValue != null ? defaultValue : "");
|
|
599
|
+
const [isFocused, setIsFocused] = (0, import_react7.useState)(focused != null ? focused : false);
|
|
600
|
+
const [isDirty, setIsDirty] = (0, import_react7.useState)(false);
|
|
601
|
+
const [isTouched, setIsTouched] = (0, import_react7.useState)(false);
|
|
602
|
+
const [localStatus, setLocalStatus] = (0, import_react7.useState)(status || "default" /* DEFAULT */);
|
|
603
|
+
const [inputType, setInputType] = (0, import_react7.useState)(type);
|
|
604
|
+
const [isShowPwd, setIsShowPwd] = (0, import_react7.useState)(false);
|
|
605
|
+
const helpClasses = (0, import_clsx4.default)("help", localStatus && is(localStatus));
|
|
606
|
+
const loader = hashClass(styled, (0, import_clsx4.default)(is("searching")));
|
|
607
|
+
const inputLabelClasses = hashClass(styled, "input-label");
|
|
608
|
+
const iconTimesClasses = hashClass(styled, (0, import_clsx4.default)(is("justified-self")));
|
|
609
|
+
const srOnlyClasses = hashClass(styled, (0, import_clsx4.default)("sr-only"));
|
|
610
|
+
const classes = hashClass(styled, (0, import_clsx4.default)("input", localStatus && is(localStatus)));
|
|
611
|
+
const wrapperClasses = hashClass(
|
|
612
|
+
styled,
|
|
613
|
+
(0, import_clsx4.default)("field", className, type === "password" /* PASSWORD */ && securityGauge && has("gauge"))
|
|
614
|
+
);
|
|
615
|
+
const hasIcon = iconNameLeft || iconNameRight;
|
|
616
|
+
const controlClasses = hashClass(
|
|
617
|
+
styled,
|
|
618
|
+
(0, import_clsx4.default)("control", {
|
|
619
|
+
[has("icons-right")]: hasIcon != null ? hasIcon : iconNameRight || type === "password" /* PASSWORD */,
|
|
620
|
+
[has("icons-left")]: iconNameLeft || type === "search" /* SEARCH */
|
|
621
|
+
})
|
|
622
|
+
);
|
|
623
|
+
const onPressKey = (0, import_react7.useCallback)((e) => {
|
|
624
|
+
const target = e.target;
|
|
625
|
+
return {
|
|
626
|
+
inputName: target.name,
|
|
627
|
+
inputValue: target.value,
|
|
628
|
+
inputKeyCode: e.keyCode,
|
|
629
|
+
target,
|
|
630
|
+
event: e,
|
|
631
|
+
preventDefault: () => e.preventDefault()
|
|
632
|
+
};
|
|
633
|
+
}, []);
|
|
634
|
+
const IconWrapper = (0, import_react7.useCallback)(
|
|
635
|
+
({ className: className2, name: name2, color, closeIconSearch, onPress, srOnly, showPassword }) => {
|
|
636
|
+
const Markup = showPassword ? "button" : "div";
|
|
637
|
+
return /* @__PURE__ */ import_react7.default.createElement(
|
|
638
|
+
Markup,
|
|
639
|
+
{
|
|
640
|
+
...showPassword && { "data-show-pwd": true, type: "button" },
|
|
641
|
+
onClick: (e) => {
|
|
642
|
+
onPress && onPress();
|
|
643
|
+
if (onIconClick) {
|
|
644
|
+
onIconClick({ inputName: name2 != null ? name2 : "", inputValue: _value, target: e.target });
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
/* @__PURE__ */ import_react7.default.createElement(Icon_default, { className: className2, name: name2, size: "small" /* SMALL */, color }),
|
|
649
|
+
_value && _value.length > 0 && closeIconSearch && /* @__PURE__ */ import_react7.default.createElement(
|
|
650
|
+
Icon_default,
|
|
651
|
+
{
|
|
652
|
+
onClick: () => setValue(""),
|
|
653
|
+
className: iconTimesClasses,
|
|
654
|
+
name: "tri-times" /* TIMES_CIRCLE */,
|
|
655
|
+
size: "small" /* SMALL */
|
|
656
|
+
}
|
|
657
|
+
),
|
|
658
|
+
showPassword && srOnly && /* @__PURE__ */ import_react7.default.createElement("span", { className: srOnlyClasses }, srOnly)
|
|
659
|
+
);
|
|
660
|
+
},
|
|
661
|
+
[_value, styled]
|
|
662
|
+
);
|
|
663
|
+
const validator = !customValidator && patternValidator ? (value2) => patternValidator.test(value2) ? "success" /* SUCCESS */ : "error" /* ERROR */ : customValidator;
|
|
664
|
+
(0, import_react7.useEffect)(() => {
|
|
665
|
+
var _a;
|
|
666
|
+
setValue((_a = value != null ? value : defaultValue) != null ? _a : "");
|
|
667
|
+
}, [value, defaultValue]);
|
|
668
|
+
(0, import_react7.useEffect)(() => {
|
|
669
|
+
setIsFocused(focused != null ? focused : false);
|
|
670
|
+
}, [focused]);
|
|
671
|
+
(0, import_react7.useEffect)(() => {
|
|
672
|
+
if (isFocused) setIsDirty(true);
|
|
673
|
+
else if (isDirty) setIsTouched(true);
|
|
674
|
+
}, [isFocused, isDirty]);
|
|
675
|
+
(0, import_react7.useEffect)(() => {
|
|
676
|
+
if (!validator || !isTouched) return;
|
|
677
|
+
setLocalStatus(validator(_value));
|
|
678
|
+
}, [isFocused, isTouched]);
|
|
679
|
+
(0, import_react7.useEffect)(() => {
|
|
680
|
+
setLocalStatus(status || "default" /* DEFAULT */);
|
|
681
|
+
}, [status]);
|
|
682
|
+
(0, import_react7.useEffect)(() => {
|
|
683
|
+
if (onStatusChange) onStatusChange(localStatus);
|
|
684
|
+
}, [localStatus]);
|
|
685
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", { className: wrapperClasses, "data-has-gauge": securityGauge ? true : void 0 }, label && /* @__PURE__ */ import_react7.default.createElement("label", { className: inputLabelClasses, htmlFor: id }, label, " ", required && /* @__PURE__ */ import_react7.default.createElement(Text_default, { markup: "span" /* SPAN */, typo: "has-text-error" /* TEXT_ERROR */ }, "*")), sample && /* @__PURE__ */ import_react7.default.createElement(Text_default, { className: "input-sample", level: 2 /* TWO */, id: idSample }, sample), /* @__PURE__ */ import_react7.default.createElement("div", { className: controlClasses }, /* @__PURE__ */ import_react7.default.createElement(
|
|
686
|
+
"input",
|
|
687
|
+
{
|
|
688
|
+
"aria-describedby": `${idHelp} ${idSample}`,
|
|
689
|
+
id,
|
|
690
|
+
required,
|
|
691
|
+
readOnly,
|
|
692
|
+
...others,
|
|
693
|
+
"aria-label": !label ? accessibilityLabel : void 0,
|
|
694
|
+
type: inputType,
|
|
695
|
+
className: classes,
|
|
696
|
+
value,
|
|
697
|
+
defaultValue,
|
|
698
|
+
name,
|
|
699
|
+
onSubmit,
|
|
700
|
+
autoCapitalize: type === "password" /* PASSWORD */ ? "off" : autoCapitalize || void 0,
|
|
701
|
+
ref,
|
|
702
|
+
disabled,
|
|
703
|
+
minLength,
|
|
704
|
+
maxLength,
|
|
705
|
+
autoComplete: autoCompleteType,
|
|
706
|
+
onKeyUp: (e) => onKeyUp && onKeyUp(onPressKey(e)),
|
|
707
|
+
onKeyPress: (e) => onKeyPress && onKeyPress(onPressKey(e)),
|
|
708
|
+
onMouseEnter: (e) => onMouseEnter == null ? void 0 : onMouseEnter(e),
|
|
709
|
+
onMouseLeave: (e) => onMouseLeave == null ? void 0 : onMouseLeave(e),
|
|
710
|
+
placeholder,
|
|
711
|
+
onClick: (e) => {
|
|
712
|
+
const target = e.target;
|
|
713
|
+
if (onClick) {
|
|
714
|
+
onClick({
|
|
715
|
+
inputName: target.name,
|
|
716
|
+
inputValue: target.value,
|
|
717
|
+
target
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
onChange: (e) => {
|
|
722
|
+
if (inputType !== "date" /* DATE */ && inputType !== "datetime-local" /* DATETIME_LOCAL */ && inputType !== "number" /* NUMBER */ && inputType !== "email" /* EMAIL */) {
|
|
723
|
+
const caret = e.target.selectionStart;
|
|
724
|
+
const element = e.target;
|
|
725
|
+
window.requestAnimationFrame(() => {
|
|
726
|
+
element.selectionStart = caret;
|
|
727
|
+
element.selectionEnd = caret;
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
if (!forceControl) setValue(e.target.value);
|
|
731
|
+
if (onChange) {
|
|
732
|
+
onChange({
|
|
733
|
+
inputName: e.target.name,
|
|
734
|
+
inputValue: e.target.value,
|
|
735
|
+
inputSelectionStart: e.target.selectionStart,
|
|
736
|
+
target: e.target,
|
|
737
|
+
event: e
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
},
|
|
741
|
+
onFocus: (e) => {
|
|
742
|
+
onFocus == null ? void 0 : onFocus(e);
|
|
743
|
+
setIsFocused(true);
|
|
744
|
+
},
|
|
745
|
+
onBlur: (e) => {
|
|
746
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
747
|
+
setIsFocused(false);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
), hasIcon && !localStatus && !loading && iconNameLeft && /* @__PURE__ */ import_react7.default.createElement(IconWrapper, { name: iconNameLeft }), (iconNameLeft || type === "search" /* SEARCH */) && /* @__PURE__ */ import_react7.default.createElement(IconWrapper, { className: "icon-left", name: iconNameLeft || "tri-search" /* SEARCH */ }), iconNameRight && !loading && type !== "password" /* PASSWORD */ && /* @__PURE__ */ import_react7.default.createElement(IconWrapper, { className: "icon-right", name: iconNameRight }), !loading && type === "password" /* PASSWORD */ && /* @__PURE__ */ import_react7.default.createElement(
|
|
751
|
+
IconWrapper,
|
|
752
|
+
{
|
|
753
|
+
showPassword: true,
|
|
754
|
+
srOnly: !isShowPwd ? import_locales.inputLocale.showPassword : import_locales.inputLocale.hidePassword,
|
|
755
|
+
className: "icon-right",
|
|
756
|
+
name: isShowPwd ? "tri-eye-slash" /* EYE_SLASH */ : "tri-eye" /* EYE */,
|
|
757
|
+
onPress: () => {
|
|
758
|
+
if (inputType === "password" /* PASSWORD */) {
|
|
759
|
+
setInputType("text" /* TEXT */);
|
|
760
|
+
setIsShowPwd(true);
|
|
761
|
+
} else {
|
|
762
|
+
setInputType("password" /* PASSWORD */);
|
|
763
|
+
setIsShowPwd(false);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
), loading && /* @__PURE__ */ import_react7.default.createElement("span", { className: loader })), help && /* @__PURE__ */ import_react7.default.createElement(Text_default, { className: helpClasses, id: idHelp }, help), securityGauge && type === "password" /* PASSWORD */ && /* @__PURE__ */ import_react7.default.createElement(
|
|
768
|
+
InputGauge_default,
|
|
769
|
+
{
|
|
770
|
+
validationRules,
|
|
771
|
+
securityRules,
|
|
772
|
+
styled,
|
|
773
|
+
inputValue: _value
|
|
774
|
+
}
|
|
775
|
+
));
|
|
776
|
+
}
|
|
777
|
+
);
|
|
778
|
+
Input.displayName = "Input" /* Input */;
|
|
779
|
+
var Input_default = Input;
|
|
780
|
+
|
|
781
|
+
// components/select/web/SelectDynamic.tsx
|
|
782
|
+
var OPTION_SIZE = 48;
|
|
783
|
+
var SelectDynamic = import_react8.default.forwardRef(
|
|
784
|
+
({
|
|
785
|
+
onChange,
|
|
786
|
+
disabled,
|
|
787
|
+
onFocus,
|
|
788
|
+
onBlur,
|
|
789
|
+
children,
|
|
790
|
+
selected,
|
|
791
|
+
name,
|
|
792
|
+
id,
|
|
793
|
+
label,
|
|
794
|
+
iconName,
|
|
795
|
+
multiple,
|
|
796
|
+
className,
|
|
797
|
+
status,
|
|
798
|
+
placeholder,
|
|
799
|
+
required,
|
|
800
|
+
custom,
|
|
801
|
+
help,
|
|
802
|
+
sample,
|
|
803
|
+
...others
|
|
804
|
+
}, ref) => {
|
|
805
|
+
const { styled } = useTrilogyContext();
|
|
806
|
+
const { setIsVisibleOptions, isVisibleOptions, selectedOptionValues } = (0, import_react8.useContext)(SelectContext);
|
|
807
|
+
const containerRef = (0, import_react8.useRef)(null);
|
|
808
|
+
const [openUpward, setOpenUpward] = (0, import_react8.useState)(false);
|
|
809
|
+
const optionsListSize = (0, import_react8.useRef)(0);
|
|
810
|
+
const [dropdownStyles, setDropdownStyles] = (0, import_react8.useState)({});
|
|
811
|
+
const selectClasses = hashClass(styled, (0, import_clsx5.default)("select", className));
|
|
812
|
+
const optionsClasses = hashClass(styled, (0, import_clsx5.default)("select-options", openUpward && "select-options-top"));
|
|
813
|
+
const portalClasses = hashClass(styled, "select-trilogy_modal_open");
|
|
814
|
+
const onClickInput = () => {
|
|
815
|
+
if (containerRef.current && optionsListSize.current) {
|
|
816
|
+
const { top, bottom } = containerRef.current.getBoundingClientRect();
|
|
817
|
+
const windowHeight = window.innerHeight;
|
|
818
|
+
const spaceBelow = windowHeight - bottom;
|
|
819
|
+
const padding = 10;
|
|
820
|
+
const maxHeightBelow = spaceBelow - padding;
|
|
821
|
+
const maxHeightAbove = top - padding;
|
|
822
|
+
const openUpward2 = maxHeightBelow < optionsListSize.current && maxHeightAbove > maxHeightBelow;
|
|
823
|
+
setOpenUpward(openUpward2);
|
|
824
|
+
setDropdownStyles({
|
|
825
|
+
maxHeight: openUpward2 ? `${maxHeightAbove}px` : `${maxHeightBelow}px`,
|
|
826
|
+
overflowY: "auto"
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
setIsVisibleOptions((prev) => !prev);
|
|
830
|
+
};
|
|
831
|
+
const onCloseOptions = () => setIsVisibleOptions(false);
|
|
832
|
+
const onKeyPressInput = (keyCode) => {
|
|
833
|
+
setIsVisibleOptions((prev) => {
|
|
834
|
+
if (keyCode === 27) return false;
|
|
835
|
+
if (keyCode === 13) return !prev;
|
|
836
|
+
return prev;
|
|
837
|
+
});
|
|
838
|
+
};
|
|
839
|
+
const options = (0, import_react8.useMemo)(() => {
|
|
840
|
+
var _a;
|
|
841
|
+
return (_a = import_react8.default.Children.map(children, (child) => {
|
|
842
|
+
if (!import_react8.default.isValidElement(child)) return false;
|
|
843
|
+
return {
|
|
844
|
+
label: child.props.children || child.props.label,
|
|
845
|
+
value: child.props.value
|
|
846
|
+
};
|
|
847
|
+
})) == null ? void 0 : _a.filter((option) => option);
|
|
848
|
+
}, []);
|
|
849
|
+
const labelsSelected = (0, import_react8.useMemo)(() => {
|
|
850
|
+
return selectedOptionValues.map((selectedOption) => {
|
|
851
|
+
const elm = options == null ? void 0 : options.find((opt) => opt.value === selectedOption);
|
|
852
|
+
return elm == null ? void 0 : elm.label;
|
|
853
|
+
});
|
|
854
|
+
}, [selectedOptionValues, options]);
|
|
855
|
+
(0, import_react8.useEffect)(() => {
|
|
856
|
+
const childrenCount = import_react8.default.Children.count(children);
|
|
857
|
+
if (childrenCount > 0) {
|
|
858
|
+
optionsListSize.current = childrenCount * OPTION_SIZE;
|
|
859
|
+
}
|
|
860
|
+
}, [children]);
|
|
861
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", { className: selectClasses, ref: containerRef, ...others }, /* @__PURE__ */ import_react8.default.createElement(
|
|
862
|
+
Input_default,
|
|
863
|
+
{
|
|
864
|
+
sample,
|
|
865
|
+
help,
|
|
866
|
+
required,
|
|
867
|
+
status,
|
|
868
|
+
ref,
|
|
869
|
+
value: labelsSelected == null ? void 0 : labelsSelected.join(", "),
|
|
870
|
+
name,
|
|
871
|
+
disabled,
|
|
872
|
+
label,
|
|
873
|
+
placeholder,
|
|
874
|
+
onFocus,
|
|
875
|
+
iconNameLeft: iconName,
|
|
876
|
+
onBlur,
|
|
877
|
+
onClick: onClickInput,
|
|
878
|
+
className: isVisibleOptions ? "focus" : void 0,
|
|
879
|
+
onKeyPress: (e) => {
|
|
880
|
+
e.preventDefault();
|
|
881
|
+
},
|
|
882
|
+
onKeyUp: (e) => {
|
|
883
|
+
e.preventDefault();
|
|
884
|
+
onKeyPressInput(e.inputKeyCode);
|
|
885
|
+
},
|
|
886
|
+
...{ readOnly: true, id, role: "combobox" }
|
|
887
|
+
}
|
|
888
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
889
|
+
"ul",
|
|
890
|
+
{
|
|
891
|
+
role: "listbox",
|
|
892
|
+
className: optionsClasses,
|
|
893
|
+
style: {
|
|
894
|
+
display: isVisibleOptions ? "block" : "none",
|
|
895
|
+
...dropdownStyles
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
children
|
|
899
|
+
), isVisibleOptions && import_react_dom.default.createPortal(
|
|
900
|
+
/* @__PURE__ */ import_react8.default.createElement("div", { role: "presentation", className: portalClasses, onClick: onCloseOptions }),
|
|
901
|
+
document.body
|
|
902
|
+
));
|
|
903
|
+
}
|
|
904
|
+
);
|
|
905
|
+
SelectDynamic.displayName = "Select" /* Select */;
|
|
906
|
+
var SelectDynamic_default = SelectDynamic;
|
|
907
|
+
|
|
908
|
+
// components/select/web/SelectNative.tsx
|
|
909
|
+
var import_clsx6 = __toESM(require("clsx"));
|
|
910
|
+
var React10 = __toESM(require("react"));
|
|
911
|
+
var SelectNative = React10.forwardRef(
|
|
912
|
+
({
|
|
913
|
+
onChange,
|
|
914
|
+
disabled,
|
|
915
|
+
onFocus,
|
|
916
|
+
onBlur,
|
|
917
|
+
children,
|
|
918
|
+
selected,
|
|
919
|
+
name,
|
|
920
|
+
id,
|
|
921
|
+
testId,
|
|
922
|
+
label,
|
|
923
|
+
iconName,
|
|
924
|
+
className,
|
|
925
|
+
accessibilityLabel,
|
|
926
|
+
status,
|
|
927
|
+
required,
|
|
928
|
+
sample,
|
|
929
|
+
help,
|
|
930
|
+
...others
|
|
931
|
+
}, ref) => {
|
|
932
|
+
const { styled } = useTrilogyContext();
|
|
933
|
+
const idHelp = React10.useId();
|
|
934
|
+
const idSample = React10.useId();
|
|
935
|
+
const [focused, setIsFocused] = React10.useState(false);
|
|
936
|
+
const [selectedValues, setSelectedValues] = React10.useState(selected);
|
|
937
|
+
const selectClasses = hashClass(styled, (0, import_clsx6.default)("select", className));
|
|
938
|
+
const controlClass = hashClass(styled, (0, import_clsx6.default)("control", iconName && "has-icons-left"));
|
|
939
|
+
const helpClasses = (0, import_clsx6.default)("help", status && is(status));
|
|
940
|
+
const handleFocus = React10.useCallback((e) => {
|
|
941
|
+
setIsFocused(true);
|
|
942
|
+
onFocus && onFocus(e);
|
|
943
|
+
}, []);
|
|
944
|
+
const handleBlur = React10.useCallback((e) => {
|
|
945
|
+
setIsFocused(false);
|
|
946
|
+
onBlur && onBlur(e);
|
|
947
|
+
}, []);
|
|
948
|
+
React10.useEffect(() => {
|
|
949
|
+
setSelectedValues(selected);
|
|
950
|
+
}, [selected]);
|
|
951
|
+
return /* @__PURE__ */ React10.createElement("div", { className: selectClasses }, /* @__PURE__ */ React10.createElement("div", { className: hashClass(styled, (0, import_clsx6.default)("field", focused && "focus")) }, label && /* @__PURE__ */ React10.createElement("label", { className: hashClass(styled, "input-label"), htmlFor: id }, label, " ", required && /* @__PURE__ */ React10.createElement(Text_default, { markup: "span" /* SPAN */, typo: "has-text-error" /* TEXT_ERROR */ }, "*")), sample && /* @__PURE__ */ React10.createElement(Text_default, { className: "input-sample", level: 2 /* TWO */, id: idSample }, sample), /* @__PURE__ */ React10.createElement("div", { className: controlClass }, /* @__PURE__ */ React10.createElement(
|
|
952
|
+
"select",
|
|
953
|
+
{
|
|
954
|
+
ref,
|
|
955
|
+
className: hashClass(styled, (0, import_clsx6.default)(!label && "no-label", status && is(status))),
|
|
956
|
+
value: selectedValues,
|
|
957
|
+
"aria-label": accessibilityLabel,
|
|
958
|
+
"data-testid": testId,
|
|
959
|
+
onChange: (e) => {
|
|
960
|
+
const selectedV = Array.from(e.target.selectedOptions).map((select) => select.value);
|
|
961
|
+
setSelectedValues(selectedV);
|
|
962
|
+
if (onChange) {
|
|
963
|
+
onChange({
|
|
964
|
+
selectValue: e.target.value,
|
|
965
|
+
selectName: e.target.name,
|
|
966
|
+
selectId: e.target.id,
|
|
967
|
+
name: e.target.name,
|
|
968
|
+
selectedOptions: selectedV,
|
|
969
|
+
target: e.target
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
onFocus: handleFocus,
|
|
974
|
+
onBlur: handleBlur,
|
|
975
|
+
id: id ? String(id) : void 0,
|
|
976
|
+
name,
|
|
977
|
+
disabled,
|
|
978
|
+
role: "listbox",
|
|
979
|
+
...others
|
|
980
|
+
},
|
|
981
|
+
React10.Children.map(children, (child) => {
|
|
982
|
+
if (!React10.isValidElement(child)) return null;
|
|
983
|
+
const props = {
|
|
984
|
+
...child.props,
|
|
985
|
+
native: "true"
|
|
986
|
+
};
|
|
987
|
+
return /* @__PURE__ */ React10.createElement(option_default, { ...props });
|
|
988
|
+
})
|
|
989
|
+
), iconName && /* @__PURE__ */ React10.createElement(Icon_default, { name: iconName, size: "small" })), help && /* @__PURE__ */ React10.createElement(Text_default, { className: helpClasses, id: idHelp }, help)));
|
|
990
|
+
}
|
|
991
|
+
);
|
|
992
|
+
SelectNative.displayName = "Select" /* Select */;
|
|
993
|
+
var SelectNative_default = SelectNative;
|
|
994
|
+
|
|
995
|
+
// components/select/Select.tsx
|
|
996
|
+
var Select = React11.forwardRef(({ selected, ...props }, ref) => {
|
|
997
|
+
const [isVisibleOptions, setIsVisibleOptions] = React11.useState(false);
|
|
998
|
+
const [selectedOptionValues, setSelectedOptionValues] = React11.useState([]);
|
|
999
|
+
React11.useEffect(() => {
|
|
1000
|
+
const value = typeof selected === "string" || typeof selected === "number" ? [selected] : !selected || selected === null ? [] : selected;
|
|
1001
|
+
setSelectedOptionValues(value);
|
|
1002
|
+
}, [selected]);
|
|
1003
|
+
if (props.custom || props.multiple)
|
|
1004
|
+
return /* @__PURE__ */ React11.createElement(
|
|
1005
|
+
SelectContext.Provider,
|
|
1006
|
+
{
|
|
1007
|
+
value: {
|
|
1008
|
+
custom: props.custom || false,
|
|
1009
|
+
multiple: props.multiple || false,
|
|
1010
|
+
selectedOptionValues,
|
|
1011
|
+
isVisibleOptions,
|
|
1012
|
+
setSelectedOptionValues,
|
|
1013
|
+
setIsVisibleOptions,
|
|
1014
|
+
onChange: props.onChange
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
/* @__PURE__ */ React11.createElement(SelectDynamic_default, { ref, selected, ...props })
|
|
1018
|
+
);
|
|
1019
|
+
return /* @__PURE__ */ React11.createElement(SelectNative_default, { ref, selected, ...props });
|
|
1020
|
+
});
|
|
1021
|
+
Select.displayName = "Select" /* Select */;
|
|
1022
|
+
var Select_default = Select;
|
|
1023
|
+
|
|
1024
|
+
// components/select/option/SelectOption.tsx
|
|
1025
|
+
var import_clsx7 = __toESM(require("clsx"));
|
|
1026
|
+
var React12 = __toESM(require("react"));
|
|
1027
|
+
var SelectOption = React12.forwardRef(
|
|
1028
|
+
({ id, className, value = "", disabled, children, onClick, label, iconName, testId, ...others }, ref) => {
|
|
1029
|
+
const { styled } = useTrilogyContext();
|
|
1030
|
+
const { custom, selectedOptionValues, setSelectedOptionValues, multiple, setIsVisibleOptions, onChange } = React12.useContext(SelectContext);
|
|
1031
|
+
const isChecked = selectedOptionValues.includes(value);
|
|
1032
|
+
const selectClasses = hashClass(styled, (0, import_clsx7.default)("option", isChecked && "focus", disabled && is("disabled"), className));
|
|
1033
|
+
const handleClickOption = () => {
|
|
1034
|
+
setSelectedOptionValues((prev) => {
|
|
1035
|
+
const isInclude = prev.includes(value);
|
|
1036
|
+
const newOptionsSelected = !multiple && isInclude ? [] : !multiple && !isInclude ? [value] : isInclude ? prev.filter((opt) => opt !== value) : [...prev, value];
|
|
1037
|
+
if (onChange) {
|
|
1038
|
+
onChange({
|
|
1039
|
+
selectValue: isInclude ? void 0 : value,
|
|
1040
|
+
selectName: isInclude ? void 0 : children || label,
|
|
1041
|
+
selectId: isInclude ? void 0 : id,
|
|
1042
|
+
name: isInclude ? void 0 : children || label,
|
|
1043
|
+
selectedOptions: newOptionsSelected,
|
|
1044
|
+
target: void 0
|
|
1045
|
+
});
|
|
1046
|
+
}
|
|
1047
|
+
return newOptionsSelected;
|
|
1048
|
+
});
|
|
1049
|
+
if (!multiple) setIsVisibleOptions(false);
|
|
1050
|
+
};
|
|
1051
|
+
if (custom || multiple) {
|
|
1052
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1053
|
+
"li",
|
|
1054
|
+
{
|
|
1055
|
+
ref,
|
|
1056
|
+
id,
|
|
1057
|
+
className: selectClasses,
|
|
1058
|
+
"data-selected": isChecked,
|
|
1059
|
+
role: "option",
|
|
1060
|
+
"aria-selected": isChecked,
|
|
1061
|
+
"data-value": value,
|
|
1062
|
+
onClick: !disabled ? handleClickOption : void 0,
|
|
1063
|
+
...others
|
|
1064
|
+
},
|
|
1065
|
+
iconName && /* @__PURE__ */ React12.createElement(Icon_default, { name: iconName }),
|
|
1066
|
+
label || children
|
|
1067
|
+
);
|
|
1068
|
+
}
|
|
1069
|
+
return /* @__PURE__ */ React12.createElement(
|
|
1070
|
+
"option",
|
|
1071
|
+
{
|
|
1072
|
+
ref,
|
|
1073
|
+
role: "option",
|
|
1074
|
+
id,
|
|
1075
|
+
value,
|
|
1076
|
+
disabled,
|
|
1077
|
+
"aria-label": label,
|
|
1078
|
+
"data-testid": testId,
|
|
1079
|
+
onClick,
|
|
1080
|
+
...others
|
|
1081
|
+
},
|
|
1082
|
+
children || label
|
|
1083
|
+
);
|
|
1084
|
+
}
|
|
1085
|
+
);
|
|
1086
|
+
SelectOption.displayName = "SelectOption" /* SelectOption */;
|
|
1087
|
+
var SelectOption_default = SelectOption;
|
|
1088
|
+
|
|
1089
|
+
// components/select/option/index.ts
|
|
1090
|
+
var option_default = SelectOption_default;
|
|
1091
|
+
|
|
1092
|
+
// components/calendar/Calendar.tsx
|
|
1093
|
+
var days = [...import_locales2.calendarLocale.days];
|
|
1094
|
+
var months = [...import_locales2.calendarLocale.months];
|
|
1095
|
+
var currentDate = /* @__PURE__ */ new Date();
|
|
1096
|
+
function checkIsRange(date) {
|
|
1097
|
+
return !(date instanceof Date);
|
|
1098
|
+
}
|
|
1099
|
+
var Calendar = import_react9.default.forwardRef(
|
|
1100
|
+
({
|
|
1101
|
+
value = currentDate,
|
|
1102
|
+
minDate = new Date(currentDate.getFullYear() - 10, 0, 1),
|
|
1103
|
+
maxDate = new Date(currentDate.getFullYear() + 10, 12, 0),
|
|
1104
|
+
disabled,
|
|
1105
|
+
readOnly,
|
|
1106
|
+
disabledDates,
|
|
1107
|
+
onChange,
|
|
1108
|
+
onMonthChange
|
|
1109
|
+
}, ref) => {
|
|
1110
|
+
const { styled } = useTrilogyContext();
|
|
1111
|
+
const [visibleMonth, setVisibleMonth] = import_react9.default.useState(
|
|
1112
|
+
value instanceof Date ? value : value[0] || currentDate
|
|
1113
|
+
);
|
|
1114
|
+
const [activeDate, setActiveDate] = import_react9.default.useState(value);
|
|
1115
|
+
const [dateEndHovered, setDateEndHovered] = import_react9.default.useState();
|
|
1116
|
+
const refsDays = import_react9.default.useRef([]);
|
|
1117
|
+
const refDayFocused = import_react9.default.useRef();
|
|
1118
|
+
const refs = import_react9.default.useRef([]);
|
|
1119
|
+
const weeksId = import_react9.default.useId();
|
|
1120
|
+
const daysId = import_react9.default.useId();
|
|
1121
|
+
const calendarClasses = hashClass(styled, (0, import_clsx8.default)("calendar"));
|
|
1122
|
+
const calendarheaderClasses = hashClass(styled, (0, import_clsx8.default)("calendar-header"));
|
|
1123
|
+
const headerDropdownClasses = hashClass(styled, (0, import_clsx8.default)("calendar-header-dropdown"));
|
|
1124
|
+
const calendarActiveMonthClasses = hashClass(styled, (0, import_clsx8.default)("calendar-active-month"));
|
|
1125
|
+
const calendarDayLabelClasses = hashClass(styled, (0, import_clsx8.default)("calendar-week-day-label"));
|
|
1126
|
+
const calendarWeekDayClasses = hashClass(styled, (0, import_clsx8.default)("calendar-week-day"));
|
|
1127
|
+
const calendarActiveDateClasses = hashClass(styled, (0, import_clsx8.default)("calendar-active-date"));
|
|
1128
|
+
const calendarNextMonthClasses = hashClass(styled, (0, import_clsx8.default)("calendar-next-month"));
|
|
1129
|
+
const calendarPrevMonthClasses = hashClass(styled, (0, import_clsx8.default)("calendar-prev-month"));
|
|
1130
|
+
const calendarWeekDayDisabledClasses = hashClass(styled, (0, import_clsx8.default)("calendar-week-day-disabled"));
|
|
1131
|
+
const isDisabledClass = hashClass(styled, (0, import_clsx8.default)(is("disabled")));
|
|
1132
|
+
const isActiveClasses = hashClass(styled, (0, import_clsx8.default)(is("active")));
|
|
1133
|
+
const calendarWeekClasses = hashClass(styled, (0, import_clsx8.default)("calendar-week"));
|
|
1134
|
+
const dateStartClasses = hashClass(styled, (0, import_clsx8.default)("calendar-date-start"));
|
|
1135
|
+
const dateEndClasses = hashClass(styled, (0, import_clsx8.default)("calendar-date-end"));
|
|
1136
|
+
const rangeClasses = hashClass(styled, (0, import_clsx8.default)("calendar-range"));
|
|
1137
|
+
const dateInRangeClasses = hashClass(styled, (0, import_clsx8.default)("calendar-date-in-range"));
|
|
1138
|
+
const rangeInitClasses = hashClass(styled, (0, import_clsx8.default)("calendar-range-init"));
|
|
1139
|
+
const rondedLeftClasses = hashClass(styled, (0, import_clsx8.default)("calendar-date-rounded-left"));
|
|
1140
|
+
const rondedRightClasses = hashClass(styled, (0, import_clsx8.default)("calendar-date-rounded-right"));
|
|
1141
|
+
const isRange = checkIsRange(activeDate);
|
|
1142
|
+
const isNextDisabled = import_react9.default.useMemo(
|
|
1143
|
+
() => 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()),
|
|
1144
|
+
[maxDate, visibleMonth, disabled]
|
|
1145
|
+
);
|
|
1146
|
+
const isPrevDisabled = import_react9.default.useMemo(
|
|
1147
|
+
() => 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()),
|
|
1148
|
+
[minDate, visibleMonth, disabled]
|
|
1149
|
+
);
|
|
1150
|
+
const getAllDaysInMonth = import_react9.default.useCallback((year, month) => {
|
|
1151
|
+
const date = new Date(year, month, 1);
|
|
1152
|
+
const days2 = [];
|
|
1153
|
+
const firstDayOfMonth = date.getDay();
|
|
1154
|
+
const lastDayOfMonth = new Date(year, month + 1, 0).getDate();
|
|
1155
|
+
const allDays = [];
|
|
1156
|
+
for (let i = 0; i < firstDayOfMonth; i++) days2.push(null);
|
|
1157
|
+
for (let day = 1; day <= lastDayOfMonth; day++) days2.push(new Date(year, month, day));
|
|
1158
|
+
for (let i = 0; i < days2.length; i += 7) allDays.push(days2.slice(i, i + 7));
|
|
1159
|
+
return allDays;
|
|
1160
|
+
}, []);
|
|
1161
|
+
const yearsBetween = import_react9.default.useMemo(() => {
|
|
1162
|
+
const minYear = minDate.getFullYear();
|
|
1163
|
+
const maxYear = maxDate.getFullYear();
|
|
1164
|
+
const currentYear = value instanceof Date && (value == null ? void 0 : value.getFullYear());
|
|
1165
|
+
const isCurrentYearInclude = currentYear && currentYear >= minYear && currentYear <= maxYear;
|
|
1166
|
+
let years = Array.from({ length: maxYear - minYear + 1 }, (_, i) => {
|
|
1167
|
+
const year = minYear + i;
|
|
1168
|
+
return {
|
|
1169
|
+
value: year,
|
|
1170
|
+
disabled: false
|
|
1171
|
+
};
|
|
1172
|
+
});
|
|
1173
|
+
if (currentYear && !isCurrentYearInclude) {
|
|
1174
|
+
years = [{ value: currentYear, disabled: true }, ...years];
|
|
1175
|
+
}
|
|
1176
|
+
return years;
|
|
1177
|
+
}, [minDate, maxDate, value]);
|
|
1178
|
+
const availableMonths = import_react9.default.useMemo(() => {
|
|
1179
|
+
const currentYear = visibleMonth.getFullYear();
|
|
1180
|
+
const minYear = minDate.getFullYear();
|
|
1181
|
+
const maxYear = maxDate.getFullYear();
|
|
1182
|
+
const minMonth = minDate.getMonth();
|
|
1183
|
+
const maxMonth = maxDate.getMonth();
|
|
1184
|
+
return Array.from({ length: 12 }, (_, monthIndex) => {
|
|
1185
|
+
if (currentYear < minYear || currentYear > maxYear) return false;
|
|
1186
|
+
if (currentYear === minYear && monthIndex < minMonth) return false;
|
|
1187
|
+
if (currentYear === maxYear && monthIndex > maxMonth) return false;
|
|
1188
|
+
return true;
|
|
1189
|
+
});
|
|
1190
|
+
}, [minDate, maxDate, visibleMonth]);
|
|
1191
|
+
const availableYear = import_react9.default.useMemo(() => {
|
|
1192
|
+
const minYear = minDate.getFullYear();
|
|
1193
|
+
const maxYear = maxDate.getFullYear();
|
|
1194
|
+
return Array.from({ length: maxYear - minYear + 1 }, (_, i) => minYear + i);
|
|
1195
|
+
}, [minDate, maxDate, visibleMonth]);
|
|
1196
|
+
const allDaysInMonth = import_react9.default.useMemo(() => {
|
|
1197
|
+
refsDays.current = [];
|
|
1198
|
+
const activeYear = visibleMonth.getFullYear();
|
|
1199
|
+
const activeMonth = visibleMonth.getMonth();
|
|
1200
|
+
return getAllDaysInMonth(activeYear, activeMonth);
|
|
1201
|
+
}, [visibleMonth]);
|
|
1202
|
+
const handleClickNextPrevMonth = import_react9.default.useCallback(
|
|
1203
|
+
(month) => {
|
|
1204
|
+
const nextMonth = new Date(visibleMonth.getFullYear(), visibleMonth.getMonth() + month, visibleMonth.getDate());
|
|
1205
|
+
setVisibleMonth(nextMonth);
|
|
1206
|
+
onMonthChange && onMonthChange(nextMonth);
|
|
1207
|
+
},
|
|
1208
|
+
[visibleMonth, onMonthChange]
|
|
1209
|
+
);
|
|
1210
|
+
const handleMonthSelect = import_react9.default.useCallback(
|
|
1211
|
+
(selectedMonth) => {
|
|
1212
|
+
const newDate = new Date(visibleMonth.getFullYear(), selectedMonth, visibleMonth.getDate());
|
|
1213
|
+
setVisibleMonth(newDate);
|
|
1214
|
+
onMonthChange && onMonthChange(newDate);
|
|
1215
|
+
},
|
|
1216
|
+
[visibleMonth, onMonthChange, minDate, maxDate]
|
|
1217
|
+
);
|
|
1218
|
+
const handleYearSelect = import_react9.default.useCallback(
|
|
1219
|
+
(selectedYear) => {
|
|
1220
|
+
const newDate = new Date(selectedYear, visibleMonth.getMonth(), visibleMonth.getDate());
|
|
1221
|
+
if (newDate.getTime() < minDate.getTime() || newDate.getTime() > maxDate.getTime()) {
|
|
1222
|
+
if (newDate.getTime() < minDate.getTime()) {
|
|
1223
|
+
setVisibleMonth(new Date(selectedYear, minDate.getMonth(), visibleMonth.getDate()));
|
|
1224
|
+
onMonthChange && onMonthChange(new Date(selectedYear, minDate.getMonth(), visibleMonth.getDate()));
|
|
1225
|
+
} else {
|
|
1226
|
+
setVisibleMonth(new Date(selectedYear, maxDate.getMonth(), visibleMonth.getDate()));
|
|
1227
|
+
onMonthChange && onMonthChange(new Date(selectedYear, maxDate.getMonth(), visibleMonth.getDate()));
|
|
1228
|
+
}
|
|
1229
|
+
return;
|
|
1230
|
+
}
|
|
1231
|
+
setVisibleMonth(newDate);
|
|
1232
|
+
onMonthChange && onMonthChange(newDate);
|
|
1233
|
+
},
|
|
1234
|
+
[visibleMonth, onMonthChange, minDate, maxDate]
|
|
1235
|
+
);
|
|
1236
|
+
const navigateInDaysWithKeyboard = import_react9.default.useCallback(
|
|
1237
|
+
(currentIndex, nextIndex) => {
|
|
1238
|
+
var _a;
|
|
1239
|
+
const nextRef = refsDays.current[currentIndex + nextIndex];
|
|
1240
|
+
if (nextRef) {
|
|
1241
|
+
refDayFocused.current = nextRef;
|
|
1242
|
+
return nextRef.focus();
|
|
1243
|
+
}
|
|
1244
|
+
const mustNextMonth = [1, 7].includes(nextIndex);
|
|
1245
|
+
const mustPrevMonth = [-1, -7].includes(nextIndex);
|
|
1246
|
+
setVisibleMonth((prev) => {
|
|
1247
|
+
const currentYear = prev.getFullYear();
|
|
1248
|
+
const currentMonth = prev.getMonth();
|
|
1249
|
+
if (mustNextMonth && !isNextDisabled) return new Date(currentYear, currentMonth + 1);
|
|
1250
|
+
if (mustPrevMonth && !isPrevDisabled) return new Date(currentYear, currentMonth - 1);
|
|
1251
|
+
return prev;
|
|
1252
|
+
});
|
|
1253
|
+
if (mustNextMonth && isNextDisabled) return;
|
|
1254
|
+
if (mustPrevMonth && isPrevDisabled) return;
|
|
1255
|
+
const prevDayFocused = new Date(Number((_a = refDayFocused.current) == null ? void 0 : _a.dataset.timestamp));
|
|
1256
|
+
setTimeout(() => {
|
|
1257
|
+
const year = prevDayFocused.getFullYear();
|
|
1258
|
+
const month = prevDayFocused.getMonth();
|
|
1259
|
+
const day = prevDayFocused.getDate() + nextIndex;
|
|
1260
|
+
const nextDayFocused = new Date(year, month, day);
|
|
1261
|
+
refsDays.current[nextDayFocused.getDate() - 1].focus();
|
|
1262
|
+
refDayFocused.current = refsDays.current[nextDayFocused.getDate() - 1];
|
|
1263
|
+
}, 10);
|
|
1264
|
+
},
|
|
1265
|
+
[refsDays.current, refDayFocused.current, isNextDisabled, isPrevDisabled]
|
|
1266
|
+
);
|
|
1267
|
+
const handlePressEnterInDays = import_react9.default.useCallback(
|
|
1268
|
+
(e) => {
|
|
1269
|
+
if (readOnly) return;
|
|
1270
|
+
const elm = e.target;
|
|
1271
|
+
if (!elm) return;
|
|
1272
|
+
refsDays.current.forEach((day) => day.tabIndex = -1);
|
|
1273
|
+
elm.tabIndex = 0;
|
|
1274
|
+
const newDate = new Date(Number(elm.dataset.timestamp));
|
|
1275
|
+
let newActiveDate = [newDate];
|
|
1276
|
+
if (!isRange) newActiveDate = newDate;
|
|
1277
|
+
if (isRange && activeDate.length === 1 && newDate.getTime() > activeDate[0].getTime()) {
|
|
1278
|
+
newActiveDate = [...activeDate, newDate];
|
|
1279
|
+
}
|
|
1280
|
+
setActiveDate(newActiveDate);
|
|
1281
|
+
setDateEndHovered(void 0);
|
|
1282
|
+
onChange && onChange(newActiveDate);
|
|
1283
|
+
},
|
|
1284
|
+
[refsDays.current, onChange, readOnly, activeDate, isRange]
|
|
1285
|
+
);
|
|
1286
|
+
const onKeyDownDay = import_react9.default.useCallback(
|
|
1287
|
+
(e, index, isDisabled) => {
|
|
1288
|
+
switch (e.key) {
|
|
1289
|
+
case "ArrowRight":
|
|
1290
|
+
return navigateInDaysWithKeyboard(index, 1);
|
|
1291
|
+
case "ArrowLeft":
|
|
1292
|
+
return navigateInDaysWithKeyboard(index, -1);
|
|
1293
|
+
case "ArrowUp":
|
|
1294
|
+
return navigateInDaysWithKeyboard(index, -7);
|
|
1295
|
+
case "ArrowDown":
|
|
1296
|
+
return navigateInDaysWithKeyboard(index, 7);
|
|
1297
|
+
case "Enter":
|
|
1298
|
+
return !isDisabled && handlePressEnterInDays(e);
|
|
1299
|
+
default:
|
|
1300
|
+
return;
|
|
1301
|
+
}
|
|
1302
|
+
},
|
|
1303
|
+
[handlePressEnterInDays, navigateInDaysWithKeyboard]
|
|
1304
|
+
);
|
|
1305
|
+
import_react9.default.useEffect(() => {
|
|
1306
|
+
var _a, _b;
|
|
1307
|
+
if (refsDays.current) {
|
|
1308
|
+
const activeDateIndex = refsDays.current.findIndex((day) => day.tabIndex === 0);
|
|
1309
|
+
if (activeDateIndex === -1 && ((_a = refsDays == null ? void 0 : refsDays.current[0]) == null ? void 0 : _a.tabIndex)) {
|
|
1310
|
+
const firstActiveDate = refsDays.current.findIndex((day) => !day.disabled);
|
|
1311
|
+
if (firstActiveDate !== -1) {
|
|
1312
|
+
refsDays.current[firstActiveDate].tabIndex = 0;
|
|
1313
|
+
refDayFocused.current = refsDays.current[firstActiveDate];
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
if (activeDateIndex !== -1 && ((_b = refsDays == null ? void 0 : refsDays.current[0]) == null ? void 0 : _b.tabIndex)) {
|
|
1317
|
+
refDayFocused.current = refsDays.current[activeDateIndex];
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
}, [refsDays.current, refDayFocused.current]);
|
|
1321
|
+
import_react9.default.useEffect(() => {
|
|
1322
|
+
setActiveDate(value);
|
|
1323
|
+
if (value instanceof Date) return setVisibleMonth(value);
|
|
1324
|
+
if (!(value instanceof Date) && value[0]) return setVisibleMonth(value[0]);
|
|
1325
|
+
}, [value]);
|
|
1326
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
1327
|
+
"table",
|
|
1328
|
+
{
|
|
1329
|
+
"data-calendar-trilogy": "",
|
|
1330
|
+
ref,
|
|
1331
|
+
className: (0, import_clsx8.default)(
|
|
1332
|
+
calendarClasses,
|
|
1333
|
+
isRange && rangeClasses,
|
|
1334
|
+
isRange && activeDate.length === 1 && rangeInitClasses
|
|
1335
|
+
)
|
|
1336
|
+
},
|
|
1337
|
+
/* @__PURE__ */ import_react9.default.createElement("thead", { className: calendarheaderClasses }, /* @__PURE__ */ import_react9.default.createElement("tr", null, /* @__PURE__ */ import_react9.default.createElement("th", { colSpan: 1, className: calendarPrevMonthClasses }, /* @__PURE__ */ import_react9.default.createElement(
|
|
1338
|
+
"button",
|
|
1339
|
+
{
|
|
1340
|
+
"data-focusable": !isPrevDisabled,
|
|
1341
|
+
onClick: () => handleClickNextPrevMonth(-1),
|
|
1342
|
+
"aria-label": "Previous month",
|
|
1343
|
+
type: "button",
|
|
1344
|
+
disabled: isPrevDisabled,
|
|
1345
|
+
ref: (el) => {
|
|
1346
|
+
if (el && refs) refs.current[1] = el;
|
|
1347
|
+
}
|
|
1348
|
+
},
|
|
1349
|
+
/* @__PURE__ */ import_react9.default.createElement(Icon_default, { name: "tri-arrow-left" })
|
|
1350
|
+
)), /* @__PURE__ */ import_react9.default.createElement("th", { colSpan: 5, className: calendarActiveMonthClasses }, /* @__PURE__ */ import_react9.default.createElement("div", { className: headerDropdownClasses }, /* @__PURE__ */ import_react9.default.createElement(
|
|
1351
|
+
Select_default,
|
|
1352
|
+
{
|
|
1353
|
+
"data-focusable": "true",
|
|
1354
|
+
selected: String(visibleMonth.getMonth()),
|
|
1355
|
+
onChange: (value2) => handleMonthSelect(Number(value2.selectValue)),
|
|
1356
|
+
ref: (el) => {
|
|
1357
|
+
if (el && refs) refs.current[2] = el;
|
|
1358
|
+
}
|
|
1359
|
+
},
|
|
1360
|
+
months.map((monthName, monthIndex) => /* @__PURE__ */ import_react9.default.createElement(option_default, { key: monthIndex, value: String(monthIndex), disabled: !availableMonths[monthIndex] }, monthName))
|
|
1361
|
+
), /* @__PURE__ */ import_react9.default.createElement(
|
|
1362
|
+
Select_default,
|
|
1363
|
+
{
|
|
1364
|
+
"data-focusable": "true",
|
|
1365
|
+
selected: String(visibleMonth.getFullYear()),
|
|
1366
|
+
onChange: (value2) => handleYearSelect(Number(value2.selectValue)),
|
|
1367
|
+
ref: (el) => {
|
|
1368
|
+
if (el && refs) refs.current[3] = el;
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
yearsBetween.map((year) => /* @__PURE__ */ import_react9.default.createElement(
|
|
1372
|
+
option_default,
|
|
1373
|
+
{
|
|
1374
|
+
key: year.value,
|
|
1375
|
+
value: String(year.value),
|
|
1376
|
+
disabled: !availableYear.includes(year.value)
|
|
1377
|
+
},
|
|
1378
|
+
String(year.value)
|
|
1379
|
+
))
|
|
1380
|
+
))), /* @__PURE__ */ import_react9.default.createElement("th", { colSpan: 1, className: calendarNextMonthClasses }, /* @__PURE__ */ import_react9.default.createElement(
|
|
1381
|
+
"button",
|
|
1382
|
+
{
|
|
1383
|
+
"data-focusable": !isNextDisabled,
|
|
1384
|
+
onClick: () => handleClickNextPrevMonth(1),
|
|
1385
|
+
"aria-label": "Next month",
|
|
1386
|
+
type: "button",
|
|
1387
|
+
disabled: isNextDisabled,
|
|
1388
|
+
ref: (el) => {
|
|
1389
|
+
if (el && refs) refs.current[4] = el;
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
/* @__PURE__ */ import_react9.default.createElement(Icon_default, { name: "tri-arrow-right" })
|
|
1393
|
+
))), /* @__PURE__ */ import_react9.default.createElement("tr", null, days.map((day, index) => {
|
|
1394
|
+
return /* @__PURE__ */ import_react9.default.createElement("td", { className: calendarDayLabelClasses, key: index }, /* @__PURE__ */ import_react9.default.createElement(Text_default, null, day.slice(0, 1)));
|
|
1395
|
+
}))),
|
|
1396
|
+
/* @__PURE__ */ import_react9.default.createElement("tbody", null, allDaysInMonth.map((week, weekIndex) => {
|
|
1397
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
1398
|
+
"tr",
|
|
1399
|
+
{
|
|
1400
|
+
key: `${weeksId}_${weekIndex}`,
|
|
1401
|
+
className: calendarWeekClasses,
|
|
1402
|
+
onMouseLeave: () => setDateEndHovered(void 0)
|
|
1403
|
+
},
|
|
1404
|
+
week.map((day, dayIndex) => {
|
|
1405
|
+
const ind = day !== null && day.getDate() - 1;
|
|
1406
|
+
const isDateStart = isRange && activeDate[0] && (day == null ? void 0 : day.getTime()) === activeDate[0].getTime();
|
|
1407
|
+
const isDateEnd = isRange && activeDate[1] && (day == null ? void 0 : day.getTime()) === activeDate[1].getTime();
|
|
1408
|
+
const today = /* @__PURE__ */ new Date();
|
|
1409
|
+
const isToday = (day == null ? void 0 : day.getFullYear()) === today.getFullYear() && (day == null ? void 0 : day.getMonth()) === today.getMonth() && (day == null ? void 0 : day.getDate()) === today.getDate();
|
|
1410
|
+
const isActive = !isRange ? (day == null ? void 0 : day.getFullYear()) === activeDate.getFullYear() && (day == null ? void 0 : day.getMonth()) === activeDate.getMonth() && (day == null ? void 0 : day.getDate()) === activeDate.getDate() : activeDate == null ? void 0 : activeDate.some(
|
|
1411
|
+
(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())
|
|
1412
|
+
);
|
|
1413
|
+
const isDisabled = disabled || day && day.getTime() > (maxDate == null ? void 0 : maxDate.getTime()) || day && day.getTime() < (minDate == null ? void 0 : minDate.getTime()) || day && (disabledDates == null ? void 0 : disabledDates.some(
|
|
1414
|
+
(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())
|
|
1415
|
+
)) || false;
|
|
1416
|
+
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();
|
|
1417
|
+
return /* @__PURE__ */ import_react9.default.createElement(
|
|
1418
|
+
"td",
|
|
1419
|
+
{
|
|
1420
|
+
key: `${daysId}_${dayIndex}_${day == null ? void 0 : day.getTime()}`,
|
|
1421
|
+
className: (0, import_clsx8.default)(
|
|
1422
|
+
calendarWeekDayClasses,
|
|
1423
|
+
isActive && calendarActiveDateClasses,
|
|
1424
|
+
isDisabled && calendarWeekDayDisabledClasses,
|
|
1425
|
+
isDateStart && dateStartClasses,
|
|
1426
|
+
isDateEnd && dateEndClasses,
|
|
1427
|
+
isInRange && dateInRangeClasses,
|
|
1428
|
+
dayIndex === 0 && rondedLeftClasses,
|
|
1429
|
+
dayIndex === 6 && rondedRightClasses
|
|
1430
|
+
)
|
|
1431
|
+
},
|
|
1432
|
+
day && ind !== false && /* @__PURE__ */ import_react9.default.createElement(
|
|
1433
|
+
"button",
|
|
1434
|
+
{
|
|
1435
|
+
disabled: isDisabled,
|
|
1436
|
+
type: "button",
|
|
1437
|
+
onKeyDown: (e) => onKeyDownDay(e, ind, isDisabled),
|
|
1438
|
+
tabIndex: isActive ? 0 : -1,
|
|
1439
|
+
"aria-selected": isActive ? "true" : "false",
|
|
1440
|
+
"data-timestamp": day == null ? void 0 : day.getTime(),
|
|
1441
|
+
ref: (el) => {
|
|
1442
|
+
if (el) refsDays.current[ind] = el;
|
|
1443
|
+
},
|
|
1444
|
+
onMouseUp: (e) => !isDisabled && handlePressEnterInDays(e),
|
|
1445
|
+
className: (0, import_clsx8.default)(isDisabled && isDisabledClass, isActive && isActiveClasses),
|
|
1446
|
+
onMouseOver: () => {
|
|
1447
|
+
if (!isRange) return;
|
|
1448
|
+
if (activeDate[0] !== void 0 && activeDate.length === 1) setDateEndHovered(day);
|
|
1449
|
+
},
|
|
1450
|
+
onClick: () => {
|
|
1451
|
+
refDayFocused.current = refsDays.current[ind];
|
|
1452
|
+
},
|
|
1453
|
+
...isToday && { "data-today": "true" },
|
|
1454
|
+
...isActive && { "data-active-date": "true" }
|
|
1455
|
+
},
|
|
1456
|
+
day.getDate()
|
|
1457
|
+
)
|
|
1458
|
+
);
|
|
1459
|
+
})
|
|
1460
|
+
);
|
|
1461
|
+
}))
|
|
1462
|
+
);
|
|
1463
|
+
}
|
|
1464
|
+
);
|
|
1465
|
+
Calendar.displayName = "Calendar" /* Calendar */;
|
|
1466
|
+
var Calendar_default = Calendar;
|
|
1467
|
+
|
|
1468
|
+
// helpers/clickOutside/index.ts
|
|
1469
|
+
var import_react10 = require("react");
|
|
1470
|
+
var useClickOutside = (ref, callback) => {
|
|
1471
|
+
const stableCallback = (0, import_react10.useCallback)(callback, [callback]);
|
|
1472
|
+
(0, import_react10.useEffect)(() => {
|
|
1473
|
+
const handleClickOutside = (event) => {
|
|
1474
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
1475
|
+
stableCallback();
|
|
1476
|
+
}
|
|
1477
|
+
};
|
|
1478
|
+
document.addEventListener("mouseup", handleClickOutside);
|
|
1479
|
+
return () => {
|
|
1480
|
+
document.removeEventListener("mouseup", handleClickOutside);
|
|
1481
|
+
};
|
|
1482
|
+
}, [ref, stableCallback]);
|
|
1483
|
+
};
|
|
1484
|
+
|
|
1485
|
+
// components/datepicker/DatePicker.tsx
|
|
1486
|
+
var import_clsx15 = __toESM(require("clsx"));
|
|
1487
|
+
var import_react14 = __toESM(require("react"));
|
|
1488
|
+
var import_react_dom2 = __toESM(require("react-dom"));
|
|
1489
|
+
|
|
1490
|
+
// components/button/Button.tsx
|
|
1491
|
+
var import_clsx9 = __toESM(require("clsx"));
|
|
1492
|
+
var import_react11 = __toESM(require("react"));
|
|
1493
|
+
|
|
1494
|
+
// components/button/ButtonEnum.ts
|
|
1495
|
+
var ButtonMarkup = /* @__PURE__ */ ((ButtonMarkup2) => {
|
|
1496
|
+
ButtonMarkup2["BUTTON"] = "button";
|
|
1497
|
+
ButtonMarkup2["INPUT"] = "input";
|
|
1498
|
+
ButtonMarkup2["A"] = "a";
|
|
1499
|
+
return ButtonMarkup2;
|
|
1500
|
+
})(ButtonMarkup || {});
|
|
1501
|
+
|
|
1502
|
+
// components/button/Button.tsx
|
|
1503
|
+
var Button = import_react11.default.forwardRef(
|
|
1504
|
+
({
|
|
1505
|
+
markup,
|
|
1506
|
+
loading,
|
|
1507
|
+
variant,
|
|
1508
|
+
href,
|
|
1509
|
+
id,
|
|
1510
|
+
fullwidth,
|
|
1511
|
+
children,
|
|
1512
|
+
className,
|
|
1513
|
+
to,
|
|
1514
|
+
accessibilityLabel,
|
|
1515
|
+
onClick,
|
|
1516
|
+
name,
|
|
1517
|
+
routerLink,
|
|
1518
|
+
type,
|
|
1519
|
+
iconName,
|
|
1520
|
+
disabled,
|
|
1521
|
+
...others
|
|
1522
|
+
}, ref) => {
|
|
1523
|
+
const isDisabled = disabled || false;
|
|
1524
|
+
const { styled } = useTrilogyContext();
|
|
1525
|
+
const isCorrectMarkup2 = (stringMarkup) => {
|
|
1526
|
+
if (stringMarkup in ButtonMarkup || Object.values(ButtonMarkup).includes(stringMarkup))
|
|
1527
|
+
return true;
|
|
1528
|
+
};
|
|
1529
|
+
const getClassNames = (loading2, variant2, fullwidth2, className2) => {
|
|
1530
|
+
return (0, import_clsx9.default)(
|
|
1531
|
+
"button",
|
|
1532
|
+
loading2 && is("loading"),
|
|
1533
|
+
variant2 && is(getButtonVariantClassName(variant2)),
|
|
1534
|
+
fullwidth2 && is("fullwidth"),
|
|
1535
|
+
className2
|
|
1536
|
+
);
|
|
1537
|
+
};
|
|
1538
|
+
const classes = hashClass(styled, getClassNames(loading, variant, fullwidth, className));
|
|
1539
|
+
const Tag = markup && isCorrectMarkup2(markup) ? markup : "button";
|
|
1540
|
+
if (Tag === "button" && !href && !to) {
|
|
1541
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1542
|
+
"button",
|
|
1543
|
+
{
|
|
1544
|
+
ref,
|
|
1545
|
+
id,
|
|
1546
|
+
"aria-label": accessibilityLabel,
|
|
1547
|
+
className: classes,
|
|
1548
|
+
disabled: isDisabled,
|
|
1549
|
+
name,
|
|
1550
|
+
onClick: (e) => {
|
|
1551
|
+
!isDisabled && (onClick == null ? void 0 : onClick(e));
|
|
1552
|
+
e.stopPropagation();
|
|
1553
|
+
},
|
|
1554
|
+
type: type != null ? type : "button",
|
|
1555
|
+
...others
|
|
1556
|
+
},
|
|
1557
|
+
iconName && /* @__PURE__ */ import_react11.default.createElement(Icon_default, { className: !children ? "is-marginless" : "", name: iconName }),
|
|
1558
|
+
children
|
|
1559
|
+
);
|
|
1560
|
+
}
|
|
1561
|
+
if (Tag === "input") {
|
|
1562
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1563
|
+
"input",
|
|
1564
|
+
{
|
|
1565
|
+
ref,
|
|
1566
|
+
id,
|
|
1567
|
+
className: classes,
|
|
1568
|
+
"aria-label": accessibilityLabel,
|
|
1569
|
+
name,
|
|
1570
|
+
onClick: (e) => {
|
|
1571
|
+
!isDisabled && (onClick == null ? void 0 : onClick(e));
|
|
1572
|
+
e.stopPropagation();
|
|
1573
|
+
},
|
|
1574
|
+
disabled: isDisabled,
|
|
1575
|
+
type: type != null ? type : "submit",
|
|
1576
|
+
value: `${children}`,
|
|
1577
|
+
...others
|
|
1578
|
+
}
|
|
1579
|
+
);
|
|
1580
|
+
}
|
|
1581
|
+
if (routerLink && to && !isDisabled) {
|
|
1582
|
+
const RouterLink = routerLink ? routerLink : "a";
|
|
1583
|
+
return /* @__PURE__ */ import_react11.default.createElement(RouterLink, { ref, "aria-label": accessibilityLabel, to, className: classes, ...others }, iconName && /* @__PURE__ */ import_react11.default.createElement(Icon_default, { className: !children ? "is-marginless" : "", name: iconName }), children);
|
|
1584
|
+
}
|
|
1585
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1586
|
+
"a",
|
|
1587
|
+
{
|
|
1588
|
+
ref,
|
|
1589
|
+
id,
|
|
1590
|
+
"aria-label": accessibilityLabel,
|
|
1591
|
+
className: classes,
|
|
1592
|
+
href,
|
|
1593
|
+
onClick: (e) => {
|
|
1594
|
+
!isDisabled && (onClick == null ? void 0 : onClick(e));
|
|
1595
|
+
e.stopPropagation();
|
|
1596
|
+
},
|
|
1597
|
+
...others,
|
|
1598
|
+
...disabled && { "aria-disabled": true }
|
|
1599
|
+
},
|
|
1600
|
+
iconName && /* @__PURE__ */ import_react11.default.createElement(Icon_default, { className: !children ? "is-marginless" : "", name: iconName }),
|
|
1601
|
+
children
|
|
1602
|
+
);
|
|
1603
|
+
}
|
|
1604
|
+
);
|
|
1605
|
+
Button.displayName = "Button" /* Button */;
|
|
1606
|
+
|
|
1607
|
+
// components/button/list/ButtonList.tsx
|
|
1608
|
+
var import_clsx10 = __toESM(require("clsx"));
|
|
1609
|
+
var React15 = __toESM(require("react"));
|
|
1610
|
+
var ButtonList = React15.forwardRef(
|
|
1611
|
+
({ className, id, align, direction, ...others }, ref) => {
|
|
1612
|
+
const { styled } = useTrilogyContext();
|
|
1613
|
+
return /* @__PURE__ */ React15.createElement(
|
|
1614
|
+
"div",
|
|
1615
|
+
{
|
|
1616
|
+
ref,
|
|
1617
|
+
id,
|
|
1618
|
+
className: hashClass(
|
|
1619
|
+
styled,
|
|
1620
|
+
(0, import_clsx10.default)(
|
|
1621
|
+
"buttons",
|
|
1622
|
+
className,
|
|
1623
|
+
align && is(getJustifiedClassName(align)),
|
|
1624
|
+
direction === "column" /* COLUMN */ && is("vertical")
|
|
1625
|
+
)
|
|
1626
|
+
),
|
|
1627
|
+
...others
|
|
1628
|
+
}
|
|
1629
|
+
);
|
|
1630
|
+
}
|
|
1631
|
+
);
|
|
1632
|
+
ButtonList.displayName = "ButtonList" /* ButtonList */;
|
|
1633
|
+
|
|
1634
|
+
// components/title/Title.tsx
|
|
1635
|
+
var import_clsx11 = __toESM(require("clsx"));
|
|
1636
|
+
var import_react12 = __toESM(require("react"));
|
|
1637
|
+
|
|
1638
|
+
// components/title/TitleEnum.ts
|
|
1639
|
+
var TitleMarkup = /* @__PURE__ */ ((TitleMarkup2) => {
|
|
1640
|
+
TitleMarkup2["H1"] = "h1";
|
|
1641
|
+
TitleMarkup2["H2"] = "h2";
|
|
1642
|
+
TitleMarkup2["H3"] = "h3";
|
|
1643
|
+
TitleMarkup2["H4"] = "h4";
|
|
1644
|
+
TitleMarkup2["H5"] = "h5";
|
|
1645
|
+
TitleMarkup2["H6"] = "h6";
|
|
1646
|
+
TitleMarkup2["P"] = "p";
|
|
1647
|
+
TitleMarkup2["SPAN"] = "span";
|
|
1648
|
+
TitleMarkup2["DIV"] = "div";
|
|
1649
|
+
return TitleMarkup2;
|
|
1650
|
+
})(TitleMarkup || {});
|
|
1651
|
+
|
|
1652
|
+
// components/title/Title.tsx
|
|
1653
|
+
var getTitleLevel = (level) => {
|
|
1654
|
+
if (level) {
|
|
1655
|
+
switch (level) {
|
|
1656
|
+
case 1 /* ONE */:
|
|
1657
|
+
return is(`level-1`);
|
|
1658
|
+
case 2 /* TWO */:
|
|
1659
|
+
return is(`level-2`);
|
|
1660
|
+
case 3 /* THREE */:
|
|
1661
|
+
return is(`level-3`);
|
|
1662
|
+
case 4 /* FOUR */:
|
|
1663
|
+
return is(`level-4`);
|
|
1664
|
+
case 5 /* FIVE */:
|
|
1665
|
+
return is(`level-5`);
|
|
1666
|
+
case 6 /* SIX */:
|
|
1667
|
+
return is(`level-6`);
|
|
1668
|
+
default:
|
|
1669
|
+
return is(`level-${level}`);
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
};
|
|
1673
|
+
var isCorrectMarkup = (stringMarkup) => {
|
|
1674
|
+
return stringMarkup in TitleMarkup || Object.values(TitleMarkup).includes(stringMarkup);
|
|
1675
|
+
};
|
|
1676
|
+
var Title = import_react12.default.forwardRef(({
|
|
1677
|
+
level = 1 /* ONE */,
|
|
1678
|
+
markup,
|
|
1679
|
+
children,
|
|
1680
|
+
className,
|
|
1681
|
+
id,
|
|
1682
|
+
typo,
|
|
1683
|
+
skeleton,
|
|
1684
|
+
inverted,
|
|
1685
|
+
onClick,
|
|
1686
|
+
accessibilityLabel,
|
|
1687
|
+
subtitle,
|
|
1688
|
+
overline,
|
|
1689
|
+
marginless,
|
|
1690
|
+
...others
|
|
1691
|
+
}, ref) => {
|
|
1692
|
+
const { styled } = useTrilogyContext();
|
|
1693
|
+
const classes = hashClass(
|
|
1694
|
+
styled,
|
|
1695
|
+
(0, import_clsx11.default)(
|
|
1696
|
+
"title",
|
|
1697
|
+
level && getTitleLevel(level),
|
|
1698
|
+
typo,
|
|
1699
|
+
skeleton && is("loading"),
|
|
1700
|
+
inverted && is("inverted"),
|
|
1701
|
+
marginless && is("marginless"),
|
|
1702
|
+
className
|
|
1703
|
+
)
|
|
1704
|
+
);
|
|
1705
|
+
const subtitleClasses = hashClass(styled, (0, import_clsx11.default)("subtitle", typo, className));
|
|
1706
|
+
const overlineClasses = hashClass(styled, (0, import_clsx11.default)("overline", typo, className));
|
|
1707
|
+
const Tag = markup && isCorrectMarkup(markup) ? markup : "p";
|
|
1708
|
+
const getClassname = () => {
|
|
1709
|
+
if (subtitle) return subtitleClasses;
|
|
1710
|
+
if (overline) return overlineClasses;
|
|
1711
|
+
return classes;
|
|
1712
|
+
};
|
|
1713
|
+
return /* @__PURE__ */ import_react12.default.createElement(Tag, { ref, id, "aria-label": accessibilityLabel, onClick, className: getClassname(), ...others }, children);
|
|
1714
|
+
});
|
|
1715
|
+
Title.displayName = "Title" /* Title */;
|
|
1716
|
+
var Title_default = Title;
|
|
1717
|
+
|
|
1718
|
+
// components/modal/Modal.tsx
|
|
1719
|
+
var import_locales3 = require("@trilogy-ds/locales");
|
|
1720
|
+
var import_clsx12 = __toESM(require("clsx"));
|
|
1721
|
+
var import_react13 = __toESM(require("react"));
|
|
1722
|
+
var Modal = import_react13.default.forwardRef(
|
|
1723
|
+
({
|
|
1724
|
+
children,
|
|
1725
|
+
className,
|
|
1726
|
+
id,
|
|
1727
|
+
accessibilityLabel = "Close",
|
|
1728
|
+
active,
|
|
1729
|
+
onClose,
|
|
1730
|
+
unClosable,
|
|
1731
|
+
panel,
|
|
1732
|
+
size,
|
|
1733
|
+
hideCloseButton = false,
|
|
1734
|
+
trigger,
|
|
1735
|
+
title,
|
|
1736
|
+
...others
|
|
1737
|
+
}, ref) => {
|
|
1738
|
+
const modalContentRef = (0, import_react13.useRef)(null);
|
|
1739
|
+
const [display, setDisplay] = (0, import_react13.useState)(active || false);
|
|
1740
|
+
const { styled } = useTrilogyContext();
|
|
1741
|
+
const refBtnModal = (0, import_react13.useRef)(null);
|
|
1742
|
+
const refModal = (0, import_react13.useRef)(null);
|
|
1743
|
+
const modalGeneratedId = (0, import_react13.useId)();
|
|
1744
|
+
const focusableElementsRef = (0, import_react13.useRef)(null);
|
|
1745
|
+
const currentFocusIndexRef = (0, import_react13.useRef)(0);
|
|
1746
|
+
const handleClose = import_react13.default.useCallback(
|
|
1747
|
+
(onCloseFunc, e) => {
|
|
1748
|
+
if (!unClosable) {
|
|
1749
|
+
setDisplay(false);
|
|
1750
|
+
refBtnModal.current && refBtnModal.current.focus();
|
|
1751
|
+
if (onCloseFunc) onCloseFunc(e);
|
|
1752
|
+
}
|
|
1753
|
+
},
|
|
1754
|
+
[refBtnModal.current]
|
|
1755
|
+
);
|
|
1756
|
+
const classes = hashClass(
|
|
1757
|
+
styled,
|
|
1758
|
+
(0, import_clsx12.default)("modal", display && is("active"), size && is(size), panel && is("panel"), className)
|
|
1759
|
+
);
|
|
1760
|
+
const onKeyDown = (0, import_react13.useCallback)(
|
|
1761
|
+
(e) => {
|
|
1762
|
+
if (display && e.key === "Tab") {
|
|
1763
|
+
e.preventDefault();
|
|
1764
|
+
if (focusableElementsRef.current) {
|
|
1765
|
+
const currentIndex = currentFocusIndexRef.current;
|
|
1766
|
+
const offset = e.shiftKey ? -1 : 1;
|
|
1767
|
+
const nextIndex = (currentIndex + offset + focusableElementsRef.current.length) % focusableElementsRef.current.length;
|
|
1768
|
+
currentFocusIndexRef.current = nextIndex;
|
|
1769
|
+
focusableElementsRef.current[nextIndex].focus();
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
if (!unClosable && display && e.key === "Escape") {
|
|
1773
|
+
e.preventDefault();
|
|
1774
|
+
setDisplay(false);
|
|
1775
|
+
refBtnModal.current && refBtnModal.current.focus();
|
|
1776
|
+
currentFocusIndexRef.current = 0;
|
|
1777
|
+
onClose && onClose();
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
[display, focusableElementsRef, currentFocusIndexRef, refBtnModal, onClose]
|
|
1781
|
+
);
|
|
1782
|
+
(0, import_react13.useEffect)(() => {
|
|
1783
|
+
setDisplay((prev) => {
|
|
1784
|
+
if (prev) {
|
|
1785
|
+
refBtnModal.current && refBtnModal.current.focus();
|
|
1786
|
+
currentFocusIndexRef.current = 0;
|
|
1787
|
+
}
|
|
1788
|
+
return active || false;
|
|
1789
|
+
});
|
|
1790
|
+
}, [active, currentFocusIndexRef, refBtnModal]);
|
|
1791
|
+
(0, import_react13.useEffect)(() => {
|
|
1792
|
+
!hideCloseButton && display && focusableElementsRef.current && focusableElementsRef.current[0].focus();
|
|
1793
|
+
}, [hideCloseButton, display, focusableElementsRef]);
|
|
1794
|
+
(0, import_react13.useEffect)(() => {
|
|
1795
|
+
if (modalContentRef.current) {
|
|
1796
|
+
focusableElementsRef.current = modalContentRef.current.querySelectorAll(
|
|
1797
|
+
'button:not(:disabled), input:not(:disabled), a, select:not(:disabled), textarea:not(:disabled), details:not([aria-disabled="true"]) > summary'
|
|
1798
|
+
);
|
|
1799
|
+
}
|
|
1800
|
+
}, [modalContentRef, focusableElementsRef]);
|
|
1801
|
+
return /* @__PURE__ */ import_react13.default.createElement("div", { onKeyDown, ref: refModal }, trigger && import_react13.default.cloneElement(trigger, { ref: refBtnModal, "aria-haspopup": "dialog" }), /* @__PURE__ */ import_react13.default.createElement(
|
|
1802
|
+
"div",
|
|
1803
|
+
{
|
|
1804
|
+
ref,
|
|
1805
|
+
id,
|
|
1806
|
+
className: classes,
|
|
1807
|
+
role: "dialog",
|
|
1808
|
+
"aria-labelledby": modalGeneratedId,
|
|
1809
|
+
"aria-modal": true,
|
|
1810
|
+
onClick: (e) => {
|
|
1811
|
+
var _a;
|
|
1812
|
+
if (!((_a = modalContentRef == null ? void 0 : modalContentRef.current) == null ? void 0 : _a.contains(e.target))) {
|
|
1813
|
+
handleClose(onClose, e);
|
|
1814
|
+
}
|
|
1815
|
+
},
|
|
1816
|
+
...others
|
|
1817
|
+
},
|
|
1818
|
+
/* @__PURE__ */ import_react13.default.createElement("div", { ref: modalContentRef, className: hashClass(styled, (0, import_clsx12.default)("modal-content")) }, /* @__PURE__ */ import_react13.default.createElement("div", { className: hashClass(styled, (0, import_clsx12.default)("modal-header")) }, !hideCloseButton && !unClosable && /* @__PURE__ */ import_react13.default.createElement(
|
|
1819
|
+
"button",
|
|
1820
|
+
{
|
|
1821
|
+
onClick: (e) => {
|
|
1822
|
+
handleClose(onClose, e);
|
|
1823
|
+
},
|
|
1824
|
+
className: hashClass(styled, (0, import_clsx12.default)("modal-close", is("large"))),
|
|
1825
|
+
type: "button" /* BUTTON */
|
|
1826
|
+
},
|
|
1827
|
+
/* @__PURE__ */ import_react13.default.createElement("span", { className: hashClass(styled, (0, import_clsx12.default)("sr-only")) }, import_locales3.modalLocale.accessibilityLabelButtonClose)
|
|
1828
|
+
), /* @__PURE__ */ import_react13.default.createElement(Title_default, { id: modalGeneratedId, level: 3 /* THREE */, markup: "h1" /* H1 */ }, title)), children && children)
|
|
1829
|
+
));
|
|
1830
|
+
}
|
|
1831
|
+
);
|
|
1832
|
+
Modal.displayName = "Modal" /* Modal */;
|
|
1833
|
+
var Modal_default = Modal;
|
|
1834
|
+
|
|
1835
|
+
// components/modal/footer/ModalFooter.tsx
|
|
1836
|
+
var import_clsx13 = __toESM(require("clsx"));
|
|
1837
|
+
var React18 = __toESM(require("react"));
|
|
1838
|
+
var ModalFooter = React18.forwardRef(({ children, className, id }, ref) => {
|
|
1839
|
+
const { styled } = useTrilogyContext();
|
|
1840
|
+
return /* @__PURE__ */ React18.createElement("div", { ref, "data-modal-footer": "", id, className: hashClass(styled, (0, import_clsx13.default)("modal-footer", className)) }, children);
|
|
1841
|
+
});
|
|
1842
|
+
ModalFooter.displayName = "ModalFooter" /* ModalFooter */;
|
|
1843
|
+
|
|
1844
|
+
// components/modal/body/ModalBody.tsx
|
|
1845
|
+
var import_clsx14 = __toESM(require("clsx"));
|
|
1846
|
+
var React19 = __toESM(require("react"));
|
|
1847
|
+
var ModalBody = React19.forwardRef(({ children, className, id }, ref) => {
|
|
1848
|
+
const { styled } = useTrilogyContext();
|
|
1849
|
+
return /* @__PURE__ */ React19.createElement("div", { ref, id, className: hashClass(styled, (0, import_clsx14.default)("modal-body", className)) }, children);
|
|
1850
|
+
});
|
|
1851
|
+
ModalBody.displayName = "ModalBody" /* ModalBody */;
|
|
1852
|
+
var ModalBody_default = ModalBody;
|
|
1853
|
+
|
|
1854
|
+
// components/datepicker/DatePicker.tsx
|
|
1855
|
+
var APPROXIMATIVE_HEIGHT_CALENDAR = 420;
|
|
1856
|
+
var checkIsValidDate = (date, year, month, day) => date.getFullYear() === parseInt(year) && date.getMonth() === parseInt(month) - 1 && date.getDate() === parseInt(day) && !isNaN(date.getTime());
|
|
1857
|
+
var getFirstDayFocusable = () => {
|
|
1858
|
+
var _a;
|
|
1859
|
+
const calendar = document.querySelector("[data-calendar-trilogy]");
|
|
1860
|
+
const activeDate = calendar.querySelector(`[data-active-date]`);
|
|
1861
|
+
const today = calendar.querySelector(`[data-today]`);
|
|
1862
|
+
const firstOfMonth = calendar.querySelector(`[data-calendar-trilogy] tbody button:not(:disabled)`);
|
|
1863
|
+
return (_a = activeDate != null ? activeDate : today) != null ? _a : firstOfMonth;
|
|
1864
|
+
};
|
|
1865
|
+
var DatePicker = (0, import_react14.forwardRef)(
|
|
1866
|
+
({
|
|
1867
|
+
onChange,
|
|
1868
|
+
value,
|
|
1869
|
+
minDate,
|
|
1870
|
+
maxDate,
|
|
1871
|
+
className,
|
|
1872
|
+
label,
|
|
1873
|
+
sample,
|
|
1874
|
+
required,
|
|
1875
|
+
help,
|
|
1876
|
+
status,
|
|
1877
|
+
disabled,
|
|
1878
|
+
disabledDates,
|
|
1879
|
+
id = import_react14.default.useId(),
|
|
1880
|
+
testId,
|
|
1881
|
+
name,
|
|
1882
|
+
...others
|
|
1883
|
+
}, ref) => {
|
|
1884
|
+
const { styled } = useTrilogyContext();
|
|
1885
|
+
const { "data-cy": dataCy, ...otherProps } = others;
|
|
1886
|
+
const [day, setDay] = (0, import_react14.useState)("jj");
|
|
1887
|
+
const [month, setMonth] = (0, import_react14.useState)("mm");
|
|
1888
|
+
const [year, setYear] = (0, import_react14.useState)("aaaa");
|
|
1889
|
+
const [isOpenCalendar, setIsOpenCalendar] = (0, import_react14.useState)(false);
|
|
1890
|
+
const [canContinueTyping, setCanContinueTyping] = (0, import_react14.useState)(false);
|
|
1891
|
+
const [focused, setIsFocused] = (0, import_react14.useState)(false);
|
|
1892
|
+
const [isMobile, setIsMobile] = (0, import_react14.useState)(false);
|
|
1893
|
+
const [portalPosition, setPortalPosition] = (0, import_react14.useState)({ top: 0, left: 0, width: 0 });
|
|
1894
|
+
const refsSegment = (0, import_react14.useRef)([]);
|
|
1895
|
+
const refsFocusable = (0, import_react14.useRef)([]);
|
|
1896
|
+
const refContainer = (0, import_react14.useRef)(null);
|
|
1897
|
+
const refCalendar = (0, import_react14.useRef)(null);
|
|
1898
|
+
const currentFocusIndexRef = (0, import_react14.useRef)(0);
|
|
1899
|
+
const segmentFocused = (0, import_react14.useRef)(null);
|
|
1900
|
+
const refIcon = (0, import_react14.useRef)(null);
|
|
1901
|
+
const refInput = (0, import_react14.useRef)(null);
|
|
1902
|
+
const calendarContainerClasses = hashClass(styled, (0, import_clsx15.default)("date-picker-calendar"));
|
|
1903
|
+
const datePickerClasses = hashClass(styled, (0, import_clsx15.default)("field date-picker", className));
|
|
1904
|
+
const controlClasses = hashClass(styled, (0, import_clsx15.default)("control", has("icons-right")));
|
|
1905
|
+
const inputClasses = hashClass(styled, (0, import_clsx15.default)("input", status && is(status), focused && is("focused")));
|
|
1906
|
+
const iconRightClasses = hashClass(styled, (0, import_clsx15.default)("icon-right"));
|
|
1907
|
+
const helpClasses = (0, import_clsx15.default)("help", status && is(status));
|
|
1908
|
+
const inputLabelClasses = hashClass(styled, "input-label");
|
|
1909
|
+
const inputHidden = hashClass(styled, "input-hidden");
|
|
1910
|
+
(0, import_react14.useImperativeHandle)(ref, () => refContainer.current);
|
|
1911
|
+
useClickOutside(refCalendar, () => {
|
|
1912
|
+
setTimeout(() => {
|
|
1913
|
+
setIsOpenCalendar(false);
|
|
1914
|
+
}, 0);
|
|
1915
|
+
});
|
|
1916
|
+
useClickOutside(refInput, () => {
|
|
1917
|
+
setTimeout(() => {
|
|
1918
|
+
setIsFocused(false);
|
|
1919
|
+
}, 0);
|
|
1920
|
+
});
|
|
1921
|
+
const segments = (0, import_react14.useMemo)(
|
|
1922
|
+
() => ({
|
|
1923
|
+
day: {
|
|
1924
|
+
sensitiveValue: 3,
|
|
1925
|
+
maxValue: 31,
|
|
1926
|
+
segment: day,
|
|
1927
|
+
segmentPosition: 0,
|
|
1928
|
+
segmentSetter: setDay,
|
|
1929
|
+
label: "jj",
|
|
1930
|
+
initValue: "01"
|
|
1931
|
+
},
|
|
1932
|
+
month: {
|
|
1933
|
+
sensitiveValue: 1,
|
|
1934
|
+
maxValue: 12,
|
|
1935
|
+
segment: month,
|
|
1936
|
+
segmentPosition: 1,
|
|
1937
|
+
segmentSetter: setMonth,
|
|
1938
|
+
label: "mm",
|
|
1939
|
+
initValue: "01"
|
|
1940
|
+
},
|
|
1941
|
+
year: {
|
|
1942
|
+
sensitiveValue: false,
|
|
1943
|
+
maxValue: 9999,
|
|
1944
|
+
segment: year,
|
|
1945
|
+
segmentPosition: 2,
|
|
1946
|
+
segmentSetter: setYear,
|
|
1947
|
+
label: "aaaa",
|
|
1948
|
+
initValue: String((/* @__PURE__ */ new Date()).getFullYear())
|
|
1949
|
+
}
|
|
1950
|
+
}),
|
|
1951
|
+
[day, month, year]
|
|
1952
|
+
);
|
|
1953
|
+
const calendarValue = (0, import_react14.useMemo)(() => {
|
|
1954
|
+
if (parseInt(day) && parseInt(month) && parseInt(year)) {
|
|
1955
|
+
const newDate = /* @__PURE__ */ new Date(`${year}-${month}-${day}`);
|
|
1956
|
+
const isValidDate = checkIsValidDate(newDate, year, month, day);
|
|
1957
|
+
if (isValidDate) return newDate;
|
|
1958
|
+
}
|
|
1959
|
+
}, [day, month, year]);
|
|
1960
|
+
const calculatePortalPosition = (0, import_react14.useCallback)(() => {
|
|
1961
|
+
if (!refInput.current) return;
|
|
1962
|
+
const rect = refInput.current.getBoundingClientRect();
|
|
1963
|
+
const { top, bottom, left, width } = rect;
|
|
1964
|
+
const windowHeight = window.innerHeight;
|
|
1965
|
+
const spaceBelow = windowHeight - bottom;
|
|
1966
|
+
const padding = 10;
|
|
1967
|
+
const maxHeightBelow = spaceBelow - padding;
|
|
1968
|
+
const maxHeightAbove = top - padding;
|
|
1969
|
+
const shouldOpenUpward = maxHeightBelow < APPROXIMATIVE_HEIGHT_CALENDAR && maxHeightAbove > maxHeightBelow;
|
|
1970
|
+
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
|
|
1971
|
+
const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
|
|
1972
|
+
setPortalPosition({
|
|
1973
|
+
top: shouldOpenUpward ? top + scrollTop - APPROXIMATIVE_HEIGHT_CALENDAR - padding : bottom + scrollTop + padding,
|
|
1974
|
+
left: left + scrollLeft,
|
|
1975
|
+
width
|
|
1976
|
+
});
|
|
1977
|
+
}, []);
|
|
1978
|
+
const handleKeyPress = (0, import_react14.useCallback)(
|
|
1979
|
+
({ event, type }) => {
|
|
1980
|
+
if (disabled) return;
|
|
1981
|
+
const key = event.data;
|
|
1982
|
+
event.preventDefault();
|
|
1983
|
+
const allowedKeys = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
1984
|
+
if (!allowedKeys.includes(key)) return;
|
|
1985
|
+
const digit = parseInt(key);
|
|
1986
|
+
const { segmentPosition, segment, segmentSetter, sensitiveValue, maxValue } = segments[type];
|
|
1987
|
+
const isDay = type === "day";
|
|
1988
|
+
const isMonth = type === "month";
|
|
1989
|
+
const isYear = type === "year";
|
|
1990
|
+
const newValue = !canContinueTyping ? isYear ? `000${key}` : `0${key}` : isYear ? segment + key : segment[1] + key;
|
|
1991
|
+
if (!canContinueTyping) {
|
|
1992
|
+
segmentSetter(newValue);
|
|
1993
|
+
if (sensitiveValue === false || digit <= sensitiveValue) setCanContinueTyping(true);
|
|
1994
|
+
if (sensitiveValue && digit > sensitiveValue)
|
|
1995
|
+
setTimeout(() => {
|
|
1996
|
+
if (segmentPosition < 2) refsSegment.current[segmentPosition + 1].focus();
|
|
1997
|
+
}, 0);
|
|
1998
|
+
}
|
|
1999
|
+
if (canContinueTyping) {
|
|
2000
|
+
const num = parseInt(newValue);
|
|
2001
|
+
if (isYear && String(num).length === 5) return;
|
|
2002
|
+
if (num >= 1 && num <= maxValue) segmentSetter(isYear ? newValue.slice(-4) : newValue);
|
|
2003
|
+
if (!isYear) {
|
|
2004
|
+
setCanContinueTyping(false);
|
|
2005
|
+
setTimeout(() => {
|
|
2006
|
+
if (segmentPosition < 2) refsSegment.current[segmentPosition + 1].focus();
|
|
2007
|
+
}, 0);
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
const newDay = isDay ? newValue : day;
|
|
2011
|
+
const newMonth = isMonth ? newValue : month;
|
|
2012
|
+
const newYear = isYear ? newValue : year;
|
|
2013
|
+
if (parseInt(newDay) && parseInt(newMonth) && parseInt(newYear)) {
|
|
2014
|
+
if (onChange) onChange(`${newYear.slice(-4)}-${newMonth}-${newDay}`);
|
|
2015
|
+
}
|
|
2016
|
+
},
|
|
2017
|
+
[disabled, segments, canContinueTyping, onChange]
|
|
2018
|
+
);
|
|
2019
|
+
const formatDateValue = () => {
|
|
2020
|
+
const isValidDate = parseInt(day) && parseInt(month) && parseInt(year);
|
|
2021
|
+
return !isValidDate ? "" : `${year}-${month}-${day}`;
|
|
2022
|
+
};
|
|
2023
|
+
const handleKeyDownDay = (0, import_react14.useCallback)(
|
|
2024
|
+
(e, type) => {
|
|
2025
|
+
if (disabled) return;
|
|
2026
|
+
const { segmentSetter, label: label2, maxValue, initValue, segmentPosition, segment } = segments[type];
|
|
2027
|
+
switch (e.key) {
|
|
2028
|
+
case "Backspace":
|
|
2029
|
+
e.preventDefault();
|
|
2030
|
+
setCanContinueTyping(false);
|
|
2031
|
+
segmentSetter(label2);
|
|
2032
|
+
break;
|
|
2033
|
+
case " ":
|
|
2034
|
+
e.preventDefault();
|
|
2035
|
+
setIsOpenCalendar(true);
|
|
2036
|
+
segmentFocused.current = refsSegment.current[segmentPosition];
|
|
2037
|
+
break;
|
|
2038
|
+
case "Escape":
|
|
2039
|
+
e.preventDefault();
|
|
2040
|
+
setIsOpenCalendar(false);
|
|
2041
|
+
break;
|
|
2042
|
+
case "ArrowUp":
|
|
2043
|
+
e.preventDefault();
|
|
2044
|
+
const currentValue = parseInt(segment) || 0;
|
|
2045
|
+
const nextValue = currentValue % maxValue + 1;
|
|
2046
|
+
const availableValue = type === "year" && segment === "aaaa" ? initValue : String(nextValue).padStart(2, "0");
|
|
2047
|
+
segmentSetter(availableValue);
|
|
2048
|
+
const updatedDayUp = type === "day" ? availableValue : day;
|
|
2049
|
+
const updatedMonthUp = type === "month" ? availableValue : month;
|
|
2050
|
+
const updatedYearUp = type === "year" ? availableValue : year;
|
|
2051
|
+
if (parseInt(updatedDayUp) && parseInt(updatedMonthUp) && parseInt(updatedYearUp) && onChange) {
|
|
2052
|
+
onChange(`${updatedYearUp}-${updatedMonthUp}-${updatedDayUp}`);
|
|
2053
|
+
}
|
|
2054
|
+
break;
|
|
2055
|
+
case "ArrowDown":
|
|
2056
|
+
e.preventDefault();
|
|
2057
|
+
const value2 = parseInt(segment) || maxValue;
|
|
2058
|
+
const nextVal = value2 <= 1 ? maxValue : value2 - 1;
|
|
2059
|
+
const availableVal = type === "year" && segment === "aaaa" ? initValue : String(nextVal).padStart(2, "0");
|
|
2060
|
+
segmentSetter(availableVal);
|
|
2061
|
+
const updatedDayDown = type === "day" ? availableVal : day;
|
|
2062
|
+
const updatedMonthDown = type === "month" ? availableVal : month;
|
|
2063
|
+
const updatedYearDown = type === "year" ? availableVal : year;
|
|
2064
|
+
if (parseInt(updatedDayDown) && parseInt(updatedMonthDown) && parseInt(updatedYearDown) && onChange) {
|
|
2065
|
+
onChange(`${updatedYearDown}-${updatedMonthDown}-${updatedDayDown}`);
|
|
2066
|
+
}
|
|
2067
|
+
break;
|
|
2068
|
+
default:
|
|
2069
|
+
return;
|
|
2070
|
+
}
|
|
2071
|
+
},
|
|
2072
|
+
[disabled, segments, year, month, day]
|
|
2073
|
+
);
|
|
2074
|
+
const handleFocus = () => {
|
|
2075
|
+
if (disabled) return;
|
|
2076
|
+
setIsFocused(true);
|
|
2077
|
+
setCanContinueTyping(false);
|
|
2078
|
+
};
|
|
2079
|
+
const handlePressCalendar = () => {
|
|
2080
|
+
if (disabled) return;
|
|
2081
|
+
if (refContainer.current) segmentFocused.current = refIcon.current;
|
|
2082
|
+
calculatePortalPosition();
|
|
2083
|
+
setIsOpenCalendar(true);
|
|
2084
|
+
};
|
|
2085
|
+
const handleChangeCalendar = import_react14.default.useCallback(
|
|
2086
|
+
(e) => {
|
|
2087
|
+
const dateCalendar = e;
|
|
2088
|
+
const dateDay = dateCalendar.getDate();
|
|
2089
|
+
const dateMonth = dateCalendar.getMonth() + 1;
|
|
2090
|
+
const dateYear = dateCalendar.getFullYear();
|
|
2091
|
+
const dayFormated = dateDay < 10 ? `0${dateDay}` : String(dateDay);
|
|
2092
|
+
const monthFormated = dateMonth < 10 ? `0${dateMonth}` : String(dateMonth);
|
|
2093
|
+
const yearFormated = String(dateYear);
|
|
2094
|
+
setDay(dayFormated);
|
|
2095
|
+
setMonth(monthFormated);
|
|
2096
|
+
setYear(yearFormated);
|
|
2097
|
+
setIsOpenCalendar(false);
|
|
2098
|
+
if (onChange) onChange(`${yearFormated}-${monthFormated}-${dayFormated}`);
|
|
2099
|
+
},
|
|
2100
|
+
[onChange]
|
|
2101
|
+
);
|
|
2102
|
+
const onKeyDown = (0, import_react14.useCallback)(
|
|
2103
|
+
(e) => {
|
|
2104
|
+
var _a;
|
|
2105
|
+
if (disabled) return;
|
|
2106
|
+
if (isOpenCalendar && e.key === "Tab") {
|
|
2107
|
+
e.preventDefault();
|
|
2108
|
+
if (refsFocusable.current) {
|
|
2109
|
+
const currentIndex = currentFocusIndexRef.current;
|
|
2110
|
+
const offset = e.shiftKey ? -1 : 1;
|
|
2111
|
+
const nextIndex = (currentIndex + offset + (refsFocusable == null ? void 0 : refsFocusable.current.length)) % (refsFocusable == null ? void 0 : refsFocusable.current.length);
|
|
2112
|
+
currentFocusIndexRef.current = nextIndex;
|
|
2113
|
+
refsFocusable.current[nextIndex].focus();
|
|
2114
|
+
}
|
|
2115
|
+
}
|
|
2116
|
+
if (isOpenCalendar && ["Escape", "Enter"].includes(e.key)) {
|
|
2117
|
+
e.preventDefault();
|
|
2118
|
+
setIsOpenCalendar(false);
|
|
2119
|
+
(_a = segmentFocused.current) == null ? void 0 : _a.focus();
|
|
2120
|
+
}
|
|
2121
|
+
},
|
|
2122
|
+
[disabled, isOpenCalendar]
|
|
2123
|
+
);
|
|
2124
|
+
const calendar = (0, import_react14.useMemo)(() => {
|
|
2125
|
+
return /* @__PURE__ */ import_react14.default.createElement(
|
|
2126
|
+
Calendar_default,
|
|
2127
|
+
{
|
|
2128
|
+
disabledDates,
|
|
2129
|
+
maxDate: maxDate ? new Date(maxDate) : void 0,
|
|
2130
|
+
minDate: minDate ? new Date(minDate) : void 0,
|
|
2131
|
+
onChange: handleChangeCalendar,
|
|
2132
|
+
ref: refCalendar,
|
|
2133
|
+
value: calendarValue,
|
|
2134
|
+
onMonthChange: () => {
|
|
2135
|
+
if (isOpenCalendar && refCalendar.current) {
|
|
2136
|
+
const calendar2 = refCalendar.current;
|
|
2137
|
+
setTimeout(() => {
|
|
2138
|
+
refsFocusable.current = [];
|
|
2139
|
+
const elms = calendar2.querySelectorAll(`[data-focusable=true]`);
|
|
2140
|
+
const firstDayFocusable = getFirstDayFocusable();
|
|
2141
|
+
refsFocusable.current[0] = firstDayFocusable;
|
|
2142
|
+
elms.forEach((el, i) => {
|
|
2143
|
+
const htmlElement = el;
|
|
2144
|
+
if (htmlElement) refsFocusable.current[i + 1] = htmlElement;
|
|
2145
|
+
});
|
|
2146
|
+
}, 10);
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
);
|
|
2151
|
+
}, [
|
|
2152
|
+
disabledDates,
|
|
2153
|
+
maxDate,
|
|
2154
|
+
minDate,
|
|
2155
|
+
handleChangeCalendar,
|
|
2156
|
+
refCalendar,
|
|
2157
|
+
calendarValue,
|
|
2158
|
+
isOpenCalendar,
|
|
2159
|
+
refsFocusable
|
|
2160
|
+
]);
|
|
2161
|
+
(0, import_react14.useEffect)(() => {
|
|
2162
|
+
if (!value) {
|
|
2163
|
+
setDay("jj");
|
|
2164
|
+
setMonth("mm");
|
|
2165
|
+
setYear("aaaa");
|
|
2166
|
+
} else {
|
|
2167
|
+
const [year2, month2, day2] = value.split("-");
|
|
2168
|
+
setDay(day2);
|
|
2169
|
+
setMonth(month2);
|
|
2170
|
+
setYear(year2);
|
|
2171
|
+
}
|
|
2172
|
+
}, [value]);
|
|
2173
|
+
(0, import_react14.useEffect)(() => {
|
|
2174
|
+
if (isOpenCalendar && refCalendar.current) {
|
|
2175
|
+
const elms = refCalendar.current.querySelectorAll(`[data-focusable=true]`);
|
|
2176
|
+
const firstDayFocusable = getFirstDayFocusable();
|
|
2177
|
+
refsFocusable.current[0] = firstDayFocusable;
|
|
2178
|
+
firstDayFocusable.focus();
|
|
2179
|
+
elms.forEach((el, i) => {
|
|
2180
|
+
const htmlElement = el;
|
|
2181
|
+
if (htmlElement) refsFocusable.current[i + 1] = htmlElement;
|
|
2182
|
+
});
|
|
2183
|
+
}
|
|
2184
|
+
if (!isOpenCalendar && currentFocusIndexRef.current) currentFocusIndexRef.current = 0;
|
|
2185
|
+
}, [isOpenCalendar, refCalendar, currentFocusIndexRef]);
|
|
2186
|
+
(0, import_react14.useEffect)(() => {
|
|
2187
|
+
const handleResize = () => setIsMobile(window.innerWidth <= 768);
|
|
2188
|
+
handleResize();
|
|
2189
|
+
window.addEventListener("resize", handleResize);
|
|
2190
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
2191
|
+
}, []);
|
|
2192
|
+
(0, import_react14.useEffect)(() => {
|
|
2193
|
+
if (!isOpenCalendar) return;
|
|
2194
|
+
const handleUpdate = () => calculatePortalPosition();
|
|
2195
|
+
window.addEventListener("scroll", handleUpdate, true);
|
|
2196
|
+
window.addEventListener("resize", handleUpdate);
|
|
2197
|
+
return () => {
|
|
2198
|
+
window.removeEventListener("scroll", handleUpdate, true);
|
|
2199
|
+
window.removeEventListener("resize", handleUpdate);
|
|
2200
|
+
};
|
|
2201
|
+
}, [isOpenCalendar, calculatePortalPosition]);
|
|
2202
|
+
return /* @__PURE__ */ import_react14.default.createElement("div", { ref: refContainer, className: datePickerClasses, onKeyDown }, label && /* @__PURE__ */ import_react14.default.createElement("label", { className: inputLabelClasses, htmlFor: id }, label, " ", required && /* @__PURE__ */ import_react14.default.createElement(Text_default, { markup: "span" /* SPAN */, typo: "has-text-error" /* TEXT_ERROR */ }, "*")), sample && /* @__PURE__ */ import_react14.default.createElement(Text_default, { className: "input-sample", level: 2 /* TWO */ }, sample), /* @__PURE__ */ import_react14.default.createElement("div", { className: controlClasses }, /* @__PURE__ */ import_react14.default.createElement(
|
|
2203
|
+
"div",
|
|
2204
|
+
{
|
|
2205
|
+
role: "group",
|
|
2206
|
+
"aria-valuetext": formatDateValue(),
|
|
2207
|
+
"aria-disabled": disabled,
|
|
2208
|
+
ref: refInput,
|
|
2209
|
+
className: inputClasses,
|
|
2210
|
+
onMouseDown: (e) => {
|
|
2211
|
+
if (disabled) return;
|
|
2212
|
+
const clickedSegment = refsSegment.current.find((segment) => segment === document.activeElement);
|
|
2213
|
+
if (clickedSegment) return e.preventDefault();
|
|
2214
|
+
setTimeout(() => {
|
|
2215
|
+
refsSegment.current[0].focus();
|
|
2216
|
+
}, 0);
|
|
2217
|
+
},
|
|
2218
|
+
...otherProps
|
|
2219
|
+
},
|
|
2220
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
2221
|
+
"span",
|
|
2222
|
+
{
|
|
2223
|
+
"aria-valuemin": 1,
|
|
2224
|
+
"aria-valuemax": 31,
|
|
2225
|
+
"aria-readonly": false,
|
|
2226
|
+
"aria-label": "day",
|
|
2227
|
+
role: "spinbutton",
|
|
2228
|
+
suppressContentEditableWarning: true,
|
|
2229
|
+
autoCorrect: "off",
|
|
2230
|
+
autoCapitalize: "none",
|
|
2231
|
+
spellCheck: false,
|
|
2232
|
+
"aria-valuetext": day,
|
|
2233
|
+
contentEditable: !disabled,
|
|
2234
|
+
inputMode: "numeric",
|
|
2235
|
+
onBeforeInput: (e) => handleKeyPress({ event: e, type: "day" }),
|
|
2236
|
+
onFocus: handleFocus,
|
|
2237
|
+
onKeyDown: (e) => handleKeyDownDay(e, "day"),
|
|
2238
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
2239
|
+
onChange: (e) => e.stopPropagation(),
|
|
2240
|
+
onInput: () => refsSegment.current[0].textContent = day,
|
|
2241
|
+
ref: (el) => {
|
|
2242
|
+
if (el) refsSegment.current[0] = el;
|
|
2243
|
+
}
|
|
2244
|
+
},
|
|
2245
|
+
day
|
|
2246
|
+
),
|
|
2247
|
+
/* @__PURE__ */ import_react14.default.createElement("span", null, "/"),
|
|
2248
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
2249
|
+
"span",
|
|
2250
|
+
{
|
|
2251
|
+
"aria-valuemin": 1,
|
|
2252
|
+
"aria-valuemax": 12,
|
|
2253
|
+
"aria-readonly": false,
|
|
2254
|
+
"aria-label": "month",
|
|
2255
|
+
role: "spinbutton",
|
|
2256
|
+
suppressContentEditableWarning: true,
|
|
2257
|
+
autoCorrect: "off",
|
|
2258
|
+
autoCapitalize: "none",
|
|
2259
|
+
spellCheck: false,
|
|
2260
|
+
"aria-valuetext": month,
|
|
2261
|
+
contentEditable: !disabled,
|
|
2262
|
+
inputMode: "numeric",
|
|
2263
|
+
onBeforeInput: (e) => handleKeyPress({ event: e, type: "month" }),
|
|
2264
|
+
onFocus: handleFocus,
|
|
2265
|
+
onKeyDown: (e) => handleKeyDownDay(e, "month"),
|
|
2266
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
2267
|
+
onChange: (e) => e.stopPropagation(),
|
|
2268
|
+
onInput: () => refsSegment.current[1].textContent = month,
|
|
2269
|
+
ref: (el) => {
|
|
2270
|
+
if (el) refsSegment.current[1] = el;
|
|
2271
|
+
}
|
|
2272
|
+
},
|
|
2273
|
+
month
|
|
2274
|
+
),
|
|
2275
|
+
/* @__PURE__ */ import_react14.default.createElement("span", null, "/"),
|
|
2276
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
2277
|
+
"span",
|
|
2278
|
+
{
|
|
2279
|
+
"aria-valuemin": 0,
|
|
2280
|
+
"aria-valuemax": 9999,
|
|
2281
|
+
"aria-readonly": false,
|
|
2282
|
+
"aria-label": "year",
|
|
2283
|
+
role: "spinbutton",
|
|
2284
|
+
suppressContentEditableWarning: true,
|
|
2285
|
+
autoCorrect: "off",
|
|
2286
|
+
autoCapitalize: "none",
|
|
2287
|
+
spellCheck: false,
|
|
2288
|
+
"aria-valuetext": year,
|
|
2289
|
+
contentEditable: !disabled,
|
|
2290
|
+
inputMode: "numeric",
|
|
2291
|
+
onBeforeInput: (e) => handleKeyPress({ event: e, type: "year" }),
|
|
2292
|
+
onFocus: handleFocus,
|
|
2293
|
+
onKeyDown: (e) => handleKeyDownDay(e, "year"),
|
|
2294
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
2295
|
+
onChange: (e) => e.stopPropagation(),
|
|
2296
|
+
onInput: () => refsSegment.current[2].textContent = year,
|
|
2297
|
+
ref: (el) => {
|
|
2298
|
+
if (el) refsSegment.current[2] = el;
|
|
2299
|
+
}
|
|
2300
|
+
},
|
|
2301
|
+
year
|
|
2302
|
+
),
|
|
2303
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
2304
|
+
"input",
|
|
2305
|
+
{
|
|
2306
|
+
disabled,
|
|
2307
|
+
name,
|
|
2308
|
+
type: "text",
|
|
2309
|
+
id,
|
|
2310
|
+
"data-testid": testId,
|
|
2311
|
+
value: `${year}-${month}-${day}`,
|
|
2312
|
+
"data-cy": dataCy,
|
|
2313
|
+
tabIndex: -1,
|
|
2314
|
+
className: inputHidden,
|
|
2315
|
+
onChange: (e) => {
|
|
2316
|
+
const [year2, month2, day2] = e.target.value.split("-");
|
|
2317
|
+
setDay(day2);
|
|
2318
|
+
setMonth(month2);
|
|
2319
|
+
setYear(year2);
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
)
|
|
2323
|
+
), /* @__PURE__ */ import_react14.default.createElement(
|
|
2324
|
+
"button",
|
|
2325
|
+
{
|
|
2326
|
+
type: "button",
|
|
2327
|
+
tabIndex: disabled ? -1 : void 0,
|
|
2328
|
+
onClick: handlePressCalendar,
|
|
2329
|
+
ref: refIcon,
|
|
2330
|
+
"data-show-calendar": "true",
|
|
2331
|
+
onFocus: () => {
|
|
2332
|
+
setIsFocused(false);
|
|
2333
|
+
}
|
|
2334
|
+
},
|
|
2335
|
+
/* @__PURE__ */ import_react14.default.createElement(Icon_default, { name: "tri-calendar", className: iconRightClasses })
|
|
2336
|
+
)), help && /* @__PURE__ */ import_react14.default.createElement(Text_default, { className: helpClasses }, help), isOpenCalendar && !isMobile && import_react_dom2.default.createPortal(
|
|
2337
|
+
/* @__PURE__ */ import_react14.default.createElement(
|
|
2338
|
+
"div",
|
|
2339
|
+
{
|
|
2340
|
+
className: calendarContainerClasses,
|
|
2341
|
+
style: {
|
|
2342
|
+
position: "absolute",
|
|
2343
|
+
top: `${portalPosition.top}px`,
|
|
2344
|
+
left: `${portalPosition.left}px`,
|
|
2345
|
+
minWidth: `${portalPosition.width}px`,
|
|
2346
|
+
zIndex: 9999
|
|
2347
|
+
}
|
|
2348
|
+
},
|
|
2349
|
+
calendar
|
|
2350
|
+
),
|
|
2351
|
+
document.body
|
|
2352
|
+
), isOpenCalendar && isMobile && /* @__PURE__ */ import_react14.default.createElement(Modal_default, { active: isOpenCalendar, hideCloseButton: true }, /* @__PURE__ */ import_react14.default.createElement(ModalBody_default, null, calendar)));
|
|
2353
|
+
}
|
|
2354
|
+
);
|
|
2355
|
+
DatePicker.displayName = "DatePicker" /* DatePicker */;
|
|
2356
|
+
var DatePicker_default = DatePicker;
|
|
2357
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2358
|
+
0 && (module.exports = {
|
|
2359
|
+
DatePicker
|
|
2360
|
+
});
|