@dmsi/wedgekit-react 0.0.5 → 0.0.7
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/dist/{chunk-25Y2OMTD.js → chunk-6ZY524ID.js} +8 -4
- package/dist/{chunk-UGXT677T.js → chunk-BWRHL2AG.js} +4 -2
- package/dist/{chunk-VFWFORJJ.js → chunk-DKKYR6DS.js} +1 -0
- package/dist/{chunk-TBHTISFW.js → chunk-GTCSRHPF.js} +1 -1
- package/dist/chunk-I2UVVKQI.js +12 -0
- package/dist/{chunk-CABAANHQ.js → chunk-L4UM372R.js} +5 -1
- package/dist/chunk-Q3FKEKIN.js +23 -0
- package/dist/{chunk-YD462QK7.js → chunk-TAW5ZZ4Z.js} +4 -4
- package/dist/{chunk-UEN5BURK.js → chunk-TRUPPHBQ.js} +14 -11
- package/dist/{chunk-2B7WUAOV.js → chunk-TU55CHXU.js} +4 -2
- package/dist/{chunk-PMQOPIJZ.js → chunk-U42SKNR6.js} +45 -16
- package/dist/{chunk-SPQH4CSJ.js → chunk-XUIPGYP5.js} +11 -3
- package/dist/components/Checkbox.cjs +1 -0
- package/dist/components/Checkbox.js +1 -1
- package/dist/components/DataGrid.cjs +145 -17
- package/dist/components/DataGrid.js +138 -19
- package/dist/components/DataGridCell.cjs +4 -2
- package/dist/components/DataGridCell.js +4 -4
- package/dist/components/DateInput.cjs +4 -2
- package/dist/components/DateInput.js +1 -1
- package/dist/components/DateRangeInput.cjs +4 -2
- package/dist/components/DateRangeInput.js +1 -1
- package/dist/components/FilterGroup.cjs +559 -31
- package/dist/components/FilterGroup.js +21 -3
- package/dist/components/Input.cjs +4 -2
- package/dist/components/Input.js +1 -1
- package/dist/components/MainBar.cjs +2 -1
- package/dist/components/MainBar.js +2 -1
- package/dist/components/Menu.js +1 -1
- package/dist/components/MobileDataGrid.cjs +658 -0
- package/dist/components/MobileDataGrid.js +125 -0
- package/dist/components/Modal.cjs +147 -52
- package/dist/components/Modal.js +80 -30
- package/dist/components/ModalButtons.cjs +7 -3
- package/dist/components/ModalButtons.js +1 -1
- package/dist/components/ModalContent.cjs +25 -2
- package/dist/components/ModalContent.js +1 -1
- package/dist/components/ModalHeader.cjs +11 -3
- package/dist/components/ModalHeader.js +1 -1
- package/dist/components/ModalScrim.cjs +5 -6
- package/dist/components/ModalScrim.js +1 -1
- package/dist/components/Notification.cjs +137 -26
- package/dist/components/Notification.js +29 -16
- package/dist/components/Password.cjs +4 -2
- package/dist/components/Password.js +1 -1
- package/dist/components/Search.cjs +4 -2
- package/dist/components/Search.js +2 -2
- package/dist/components/Select.cjs +15 -7
- package/dist/components/Select.js +2 -2
- package/dist/components/SideMenuGroup.cjs +45 -16
- package/dist/components/SideMenuGroup.js +1 -1
- package/dist/components/SideMenuItem.cjs +45 -16
- package/dist/components/SideMenuItem.js +1 -1
- package/dist/components/Stack.cjs +45 -16
- package/dist/components/Stack.js +1 -1
- package/dist/components/Stepper.cjs +4 -2
- package/dist/components/Stepper.js +1 -1
- package/dist/components/Surface.cjs +4 -4
- package/dist/components/Surface.js +36 -3
- package/dist/components/Swatch.cjs +971 -22
- package/dist/components/Swatch.js +928 -7
- package/dist/components/Theme.js +3 -9
- package/dist/components/Time.cjs +150 -91
- package/dist/components/Time.js +48 -60
- package/dist/components/Toast.cjs +1 -1
- package/dist/components/Toast.js +1 -1
- package/dist/fonts.css +2 -0
- package/dist/index.css +371 -19
- package/package.json +1 -1
- package/src/brand.css +16 -1
- package/src/components/Checkbox.tsx +1 -0
- package/src/components/DataGrid.tsx +132 -3
- package/src/components/FilterGroup.tsx +25 -2
- package/src/components/Input.tsx +4 -1
- package/src/components/MainBar.tsx +2 -1
- package/src/components/Menu.tsx +11 -4
- package/src/components/MobileDataGrid.tsx +135 -0
- package/src/components/Modal.tsx +73 -13
- package/src/components/ModalButtons.tsx +26 -17
- package/src/components/ModalContent.tsx +20 -2
- package/src/components/ModalHeader.tsx +24 -13
- package/src/components/ModalScrim.tsx +4 -3
- package/src/components/Notification.tsx +21 -14
- package/src/components/Select.tsx +7 -9
- package/src/components/Stack.tsx +85 -20
- package/src/components/Surface.tsx +4 -5
- package/src/components/Swatch.tsx +779 -6
- package/src/components/Time.tsx +51 -70
- package/src/components/Toast.tsx +1 -1
- package/src/darkmode.css +18 -3
- package/src/fonts.css +2 -0
- package/src/index.css +23 -3
- package/dist/acc.css +0 -3
- package/dist/agility.css +0 -7
- package/dist/chunk-22YZ6LFN.js +0 -322
- package/dist/chunk-27OSC5OM.js +0 -68
- package/dist/chunk-2EHJFFX4.js +0 -124
- package/dist/chunk-2GC2SPSS.js +0 -130
- package/dist/chunk-2KLCMD2M.js +0 -106
- package/dist/chunk-2TLQVCQQ.js +0 -130
- package/dist/chunk-2Y6GPKXR.js +0 -263
- package/dist/chunk-322ATVWD.js +0 -298
- package/dist/chunk-35DCQU2F.js +0 -127
- package/dist/chunk-3B7FAEF7.js +0 -38
- package/dist/chunk-3FLOLZYP.js +0 -21
- package/dist/chunk-3IZWY2C7.js +0 -221
- package/dist/chunk-3NGYDV56.js +0 -38
- package/dist/chunk-3NLKVKFR.js +0 -72
- package/dist/chunk-3R7YVBRL.js +0 -135
- package/dist/chunk-3RDFNEVD.js +0 -91
- package/dist/chunk-3TPGMRVY.js +0 -123
- package/dist/chunk-42X2EOOI.js +0 -129
- package/dist/chunk-47GJZWOH.js +0 -103
- package/dist/chunk-4BUU5MTT.js +0 -263
- package/dist/chunk-4IZG2UCW.js +0 -31
- package/dist/chunk-4M7CJVTZ.js +0 -136
- package/dist/chunk-4NZBVXM3.js +0 -53
- package/dist/chunk-4S4WZ3MQ.js +0 -103
- package/dist/chunk-4SV7MJMP.js +0 -340
- package/dist/chunk-4TH2SUHQ.js +0 -145
- package/dist/chunk-56ORPWGF.js +0 -148
- package/dist/chunk-5HIUW5CM.js +0 -128
- package/dist/chunk-5K3U4IUW.js +0 -34
- package/dist/chunk-5KOZKEEM.js +0 -91
- package/dist/chunk-5OIRPFRD.js +0 -114
- package/dist/chunk-5QW5SJNW.js +0 -31
- package/dist/chunk-5QZO37QK.js +0 -263
- package/dist/chunk-5ROMJJRK.js +0 -135
- package/dist/chunk-5VHYVTZI.js +0 -123
- package/dist/chunk-6277DY3K.js +0 -437
- package/dist/chunk-6C5NOV6D.js +0 -263
- package/dist/chunk-6CDVHKTS.js +0 -103
- package/dist/chunk-6E4OJA7E.js +0 -263
- package/dist/chunk-6GBZFWQ4.js +0 -105
- package/dist/chunk-6GGLA6DI.js +0 -263
- package/dist/chunk-6HKVN4QK.js +0 -340
- package/dist/chunk-6HLJFPGY.js +0 -284
- package/dist/chunk-6KUUK27D.js +0 -31
- package/dist/chunk-6Q5NNY5V.js +0 -135
- package/dist/chunk-6VAZR5GK.js +0 -122
- package/dist/chunk-6XDXJ3Z3.js +0 -131
- package/dist/chunk-6XIXUFSA.js +0 -114
- package/dist/chunk-7CG4GVU7.js +0 -21
- package/dist/chunk-7DNCGSXK.js +0 -284
- package/dist/chunk-7GFGBJCU.js +0 -287
- package/dist/chunk-7VA3AERB.js +0 -31
- package/dist/chunk-7YJLGGIR.js +0 -83
- package/dist/chunk-7ZCBQXHR.js +0 -272
- package/dist/chunk-A4BGWCF6.js +0 -221
- package/dist/chunk-A6RDEIAN.js +0 -254
- package/dist/chunk-AE7SZPWF.js +0 -121
- package/dist/chunk-AEQYZFXI.js +0 -50
- package/dist/chunk-AFEIB2Y7.js +0 -213
- package/dist/chunk-AGQML5BM.js +0 -340
- package/dist/chunk-AHBE63RV.js +0 -263
- package/dist/chunk-AHHXD4EH.js +0 -31
- package/dist/chunk-AILPQXDY.js +0 -47
- package/dist/chunk-AKTL6JU5.js +0 -25
- package/dist/chunk-AMZFEIAM.js +0 -114
- package/dist/chunk-ANI7PKSV.js +0 -38
- package/dist/chunk-AO6WGDPJ.js +0 -105
- package/dist/chunk-ASDN5OZ3.js +0 -318
- package/dist/chunk-ASSOOV4N.js +0 -53
- package/dist/chunk-AWSUZLRR.js +0 -79
- package/dist/chunk-B6A3BOGW.js +0 -31
- package/dist/chunk-B6NMINKX.js +0 -72
- package/dist/chunk-B7UOXS2S.js +0 -221
- package/dist/chunk-BDN7SDV5.js +0 -31
- package/dist/chunk-BDPJYJD2.js +0 -218
- package/dist/chunk-BDYWCYRG.js +0 -263
- package/dist/chunk-BENTHNAQ.js +0 -51
- package/dist/chunk-BGPBLXQ5.js +0 -131
- package/dist/chunk-BKC5DNOX.js +0 -162
- package/dist/chunk-BMGYSXYW.js +0 -50
- package/dist/chunk-BNOE4DGB.js +0 -79
- package/dist/chunk-BQMI4NKT.js +0 -103
- package/dist/chunk-BSBXTPTA.js +0 -84
- package/dist/chunk-BYNATA7V.js +0 -114
- package/dist/chunk-BZFVPEG3.js +0 -98
- package/dist/chunk-C2GYWE4S.js +0 -263
- package/dist/chunk-C5NNFQ4B.js +0 -114
- package/dist/chunk-C7ALJGJG.js +0 -322
- package/dist/chunk-C7S6DKZ6.js +0 -31
- package/dist/chunk-CA4BW655.js +0 -50
- package/dist/chunk-CELC37U6.js +0 -38
- package/dist/chunk-CIWOBFZ4.js +0 -340
- package/dist/chunk-CKB4S3O3.js +0 -284
- package/dist/chunk-CL6RYGIT.js +0 -263
- package/dist/chunk-CLB4OQS5.js +0 -84
- package/dist/chunk-CMBMFSP4.js +0 -340
- package/dist/chunk-CTHHLBRT.js +0 -90
- package/dist/chunk-DDQ4KWHW.js +0 -74
- package/dist/chunk-DHWXCPF2.js +0 -56
- package/dist/chunk-DV3IMUO6.js +0 -50
- package/dist/chunk-DZHPNWUL.js +0 -70
- package/dist/chunk-DZLUR2I7.js +0 -34
- package/dist/chunk-E7H6GJIB.js +0 -31
- package/dist/chunk-EAJ37R7R.js +0 -31
- package/dist/chunk-EDMIKY4Q.js +0 -50
- package/dist/chunk-EE4GUGFX.js +0 -31
- package/dist/chunk-EHCD3FVZ.js +0 -50
- package/dist/chunk-EHOMG5B4.js +0 -31
- package/dist/chunk-EM7ODK2O.js +0 -53
- package/dist/chunk-ER3HQRPL.js +0 -105
- package/dist/chunk-ER6TD3DA.js +0 -30
- package/dist/chunk-ESK7AT3B.js +0 -38
- package/dist/chunk-ETWMDEUU.js +0 -114
- package/dist/chunk-EWX2EDF5.js +0 -236
- package/dist/chunk-EXJKOP3Y.js +0 -236
- package/dist/chunk-F2YQE6G5.js +0 -145
- package/dist/chunk-F3U3RHIB.js +0 -131
- package/dist/chunk-F433MJII.js +0 -91
- package/dist/chunk-F4JE6AD2.js +0 -160
- package/dist/chunk-FCYGYC7R.js +0 -30
- package/dist/chunk-FEEMBYZR.js +0 -98
- package/dist/chunk-FKQ63FLW.js +0 -91
- package/dist/chunk-FNFDOS7L.js +0 -263
- package/dist/chunk-FNLYAP3I.js +0 -135
- package/dist/chunk-FQVCRL3Z.js +0 -145
- package/dist/chunk-FZ6I2KRT.js +0 -263
- package/dist/chunk-FZLYFJ53.js +0 -26
- package/dist/chunk-G3AYBQ2Y.js +0 -221
- package/dist/chunk-G4V7WZAV.js +0 -72
- package/dist/chunk-GDAY5XPY.js +0 -47
- package/dist/chunk-GELM4Z36.js +0 -263
- package/dist/chunk-GGR5UY3Q.js +0 -83
- package/dist/chunk-GK556OXV.js +0 -263
- package/dist/chunk-GOB3NB3Q.js +0 -130
- package/dist/chunk-GPIG2QUB.js +0 -437
- package/dist/chunk-GV63QYC5.js +0 -130
- package/dist/chunk-GWNDXZUZ.js +0 -263
- package/dist/chunk-H3INEB6H.js +0 -296
- package/dist/chunk-H3VQYL46.js +0 -50
- package/dist/chunk-H53EBFHV.js +0 -114
- package/dist/chunk-HBD6NLMB.js +0 -51
- package/dist/chunk-HBTQFVPW.js +0 -121
- package/dist/chunk-HCDYAZGJ.js +0 -91
- package/dist/chunk-HE3XKR3P.js +0 -130
- package/dist/chunk-HK3NQMPY.js +0 -51
- package/dist/chunk-HK54SJNM.js +0 -103
- package/dist/chunk-HL2IYNCS.js +0 -50
- package/dist/chunk-I5A3SU35.js +0 -282
- package/dist/chunk-I5HKQSF2.js +0 -59
- package/dist/chunk-I7LXSGQA.js +0 -10
- package/dist/chunk-IDAZ53A4.js +0 -261
- package/dist/chunk-II6HWGH6.js +0 -295
- package/dist/chunk-IIDPTJCI.js +0 -31
- package/dist/chunk-IJ6AAL4W.js +0 -59
- package/dist/chunk-IKZQIIV3.js +0 -123
- package/dist/chunk-ISKELMPI.js +0 -67
- package/dist/chunk-IWUZ6NSN.js +0 -218
- package/dist/chunk-IYDKL3OH.js +0 -130
- package/dist/chunk-IZ75D7KD.js +0 -30
- package/dist/chunk-JCLVMFRY.js +0 -122
- package/dist/chunk-JDHZQIFC.js +0 -135
- package/dist/chunk-JFMZU3WS.js +0 -123
- package/dist/chunk-JI54AM6E.js +0 -105
- package/dist/chunk-JM4DMO5V.js +0 -91
- package/dist/chunk-JNLDVEK3.js +0 -221
- package/dist/chunk-JU3RVFK5.js +0 -114
- package/dist/chunk-JU4PINK3.js +0 -282
- package/dist/chunk-K2YPB4SV.js +0 -38
- package/dist/chunk-K5EXR7F7.js +0 -253
- package/dist/chunk-K7CWFWAA.js +0 -263
- package/dist/chunk-KGCFZ3ZY.js +0 -263
- package/dist/chunk-KJEU2OLC.js +0 -263
- package/dist/chunk-KNZWZVWO.js +0 -50
- package/dist/chunk-KVQDUSDT.js +0 -33
- package/dist/chunk-KXFCVFX7.js +0 -50
- package/dist/chunk-KXWYWY7O.js +0 -135
- package/dist/chunk-KYJFCVGO.js +0 -53
- package/dist/chunk-L4SK5HYC.js +0 -114
- package/dist/chunk-L5OMTPWT.js +0 -130
- package/dist/chunk-LBL6VQ5F.js +0 -51
- package/dist/chunk-LCJKAY5H.js +0 -122
- package/dist/chunk-LEPHUIU3.js +0 -263
- package/dist/chunk-LFNCUQNK.js +0 -103
- package/dist/chunk-LIQIMUDD.js +0 -270
- package/dist/chunk-LJ2W2FEG.js +0 -134
- package/dist/chunk-LJGUNBDS.js +0 -238
- package/dist/chunk-LK6UNOMX.js +0 -24
- package/dist/chunk-LQLPGMGP.js +0 -238
- package/dist/chunk-LRNZOITG.js +0 -318
- package/dist/chunk-LSDPH4GX.js +0 -38
- package/dist/chunk-LXYDGV6K.js +0 -437
- package/dist/chunk-MFNBBTWX.js +0 -177
- package/dist/chunk-MGJ3GO6Z.js +0 -284
- package/dist/chunk-MIMYQH75.js +0 -91
- package/dist/chunk-MKIVQLZW.js +0 -122
- package/dist/chunk-MLQQU3ZN.js +0 -31
- package/dist/chunk-MLTOT73W.js +0 -38
- package/dist/chunk-MM2YBW7A.js +0 -31
- package/dist/chunk-MMHTKJ7Z.js +0 -50
- package/dist/chunk-MNZUBPVB.js +0 -263
- package/dist/chunk-MRXJRTKP.js +0 -62
- package/dist/chunk-MSM2B2VT.js +0 -106
- package/dist/chunk-MTJDLHR6.js +0 -218
- package/dist/chunk-MU4ZBPUT.js +0 -263
- package/dist/chunk-MUQHKNFV.js +0 -158
- package/dist/chunk-N2XNU5PP.js +0 -91
- package/dist/chunk-N4NGR36H.js +0 -263
- package/dist/chunk-NA4H2JQX.js +0 -145
- package/dist/chunk-NBV3Y6UB.js +0 -315
- package/dist/chunk-NEBYCDGE.js +0 -284
- package/dist/chunk-NS2KPONF.js +0 -263
- package/dist/chunk-O2KOOPL4.js +0 -148
- package/dist/chunk-OEIQDS7X.js +0 -50
- package/dist/chunk-OJ4PX3ZG.js +0 -59
- package/dist/chunk-OOIM4AHV.js +0 -106
- package/dist/chunk-OQ2SDHRA.js +0 -267
- package/dist/chunk-OQAOAEH5.js +0 -114
- package/dist/chunk-OQWOF5CI.js +0 -322
- package/dist/chunk-ORW5CX24.js +0 -316
- package/dist/chunk-OUHI4UBN.js +0 -38
- package/dist/chunk-OULD24TE.js +0 -98
- package/dist/chunk-P66A67NV.js +0 -30
- package/dist/chunk-PC5JSEHD.js +0 -269
- package/dist/chunk-PLCJ56FF.js +0 -72
- package/dist/chunk-PMNRGAPH.js +0 -191
- package/dist/chunk-PPU6PK34.js +0 -263
- package/dist/chunk-PQEWSSM5.js +0 -31
- package/dist/chunk-PY6MF2II.js +0 -51
- package/dist/chunk-QBXVAKCM.js +0 -59
- package/dist/chunk-QDAFX66E.js +0 -55
- package/dist/chunk-QEXYUSGH.js +0 -201
- package/dist/chunk-QFEYPU44.js +0 -91
- package/dist/chunk-QJWVR7FR.js +0 -387
- package/dist/chunk-QKKRKHFR.js +0 -38
- package/dist/chunk-QKQ4M6UK.js +0 -263
- package/dist/chunk-QTKPVQAY.js +0 -66
- package/dist/chunk-R3IEEDQ6.js +0 -284
- package/dist/chunk-R4UZI5WE.js +0 -171
- package/dist/chunk-RBXILAST.js +0 -437
- package/dist/chunk-RENGWIST.js +0 -263
- package/dist/chunk-REZ33AJK.js +0 -172
- package/dist/chunk-RGI3V47F.js +0 -216
- package/dist/chunk-RMIQDOJV.js +0 -287
- package/dist/chunk-ROYYCT4A.js +0 -31
- package/dist/chunk-RWVJ2YAO.js +0 -131
- package/dist/chunk-RZLSOKZB.js +0 -123
- package/dist/chunk-S3POCSOH.js +0 -31
- package/dist/chunk-S4IHG5J6.js +0 -54
- package/dist/chunk-SHQVFIVR.js +0 -122
- package/dist/chunk-SPV52UKB.js +0 -50
- package/dist/chunk-SSBZHFHQ.js +0 -123
- package/dist/chunk-STVC6SBJ.js +0 -91
- package/dist/chunk-T23U4LBM.js +0 -148
- package/dist/chunk-TC5ACZ3X.js +0 -263
- package/dist/chunk-TD5JMMNX.js +0 -72
- package/dist/chunk-TDEEN7O7.js +0 -50
- package/dist/chunk-TKRAU33B.js +0 -53
- package/dist/chunk-TMLPJ27P.js +0 -126
- package/dist/chunk-TTKSTVEF.js +0 -41
- package/dist/chunk-TVYKK7ZX.js +0 -123
- package/dist/chunk-TZCA2T5D.js +0 -282
- package/dist/chunk-U2CMWI75.js +0 -250
- package/dist/chunk-UA7N4NQJ.js +0 -30
- package/dist/chunk-ULCNZZBV.js +0 -38
- package/dist/chunk-UO4T3RQ7.js +0 -62
- package/dist/chunk-US3SPKKB.js +0 -266
- package/dist/chunk-UUNHTQDU.js +0 -79
- package/dist/chunk-UUZXVVJY.js +0 -161
- package/dist/chunk-UZJMB6V7.js +0 -26
- package/dist/chunk-V3HXUE6V.js +0 -221
- package/dist/chunk-V6UMVJGA.js +0 -53
- package/dist/chunk-V7C6DTJ6.js +0 -72
- package/dist/chunk-VHWB6H64.js +0 -75
- package/dist/chunk-VI62SXXU.js +0 -284
- package/dist/chunk-VK3FB67Z.js +0 -31
- package/dist/chunk-VKC7QT46.js +0 -83
- package/dist/chunk-VVTY2NT4.js +0 -105
- package/dist/chunk-VWEOVI4O.js +0 -123
- package/dist/chunk-WOCMJF6O.js +0 -221
- package/dist/chunk-WPDU5H5L.js +0 -114
- package/dist/chunk-WQMFGEAF.js +0 -235
- package/dist/chunk-WTAZ6P6T.js +0 -263
- package/dist/chunk-WUJFEG3H.js +0 -118
- package/dist/chunk-WUTFZGXS.js +0 -50
- package/dist/chunk-X65IBJJM.js +0 -436
- package/dist/chunk-XATMLZOP.js +0 -263
- package/dist/chunk-XFCRKJRI.js +0 -261
- package/dist/chunk-XGKHSZ6E.js +0 -38
- package/dist/chunk-XJAQVF2E.js +0 -83
- package/dist/chunk-XQX7HSL5.js +0 -38
- package/dist/chunk-XTP3ODBD.js +0 -56
- package/dist/chunk-XWF3ZJCZ.js +0 -97
- package/dist/chunk-XX3GHFG5.js +0 -121
- package/dist/chunk-XZ6AMNDQ.js +0 -290
- package/dist/chunk-Y2LOHSZL.js +0 -72
- package/dist/chunk-Y66VCVZZ.js +0 -122
- package/dist/chunk-YELD6VJI.js +0 -68
- package/dist/chunk-YHPZ5T3W.js +0 -91
- package/dist/chunk-YJV7JCIC.js +0 -38
- package/dist/chunk-YMZUZ5HX.js +0 -263
- package/dist/chunk-YN7MUHAZ.js +0 -218
- package/dist/chunk-YOCKCBUA.js +0 -72
- package/dist/chunk-YPFUW2PT.js +0 -306
- package/dist/chunk-YRLRIQNP.js +0 -284
- package/dist/chunk-YRTR6KJN.js +0 -210
- package/dist/chunk-YSSJHCRC.js +0 -221
- package/dist/chunk-YWLJJNJY.js +0 -259
- package/dist/chunk-YYRH2SGW.js +0 -114
- package/dist/chunk-YZRIJ4AP.js +0 -263
- package/dist/chunk-Z64CLA4J.js +0 -53
- package/dist/chunk-ZCFOYW2U.js +0 -296
- package/dist/chunk-ZEYZVUG5.js +0 -53
- package/dist/chunk-ZHRZMJA3.js +0 -31
- package/dist/chunk-ZJQAMKIP.js +0 -113
- package/dist/chunk-ZRQZOT6X.js +0 -141
- package/dist/chunk-ZUTAZW53.js +0 -306
- package/dist/chunk-ZVJ2T3DC.js +0 -79
- package/dist/chunk-ZWJZHUKU.js +0 -50
- package/dist/chunk-ZXQKFHBO.js +0 -221
- package/dist/components/Calendar.cjs +0 -219
- package/dist/components/Calendar.js +0 -10
- package/dist/components/CalendarRange.stories.cjs +0 -1
- package/dist/components/CalendarRange.stories.js +0 -0
- package/dist/components/Display1.cjs +0 -223
- package/dist/components/Display1.js +0 -8
- package/dist/components/Display2.cjs +0 -220
- package/dist/components/Display2.js +0 -46
- package/dist/components/Heading1.cjs +0 -223
- package/dist/components/Heading1.js +0 -49
- package/dist/components/Heading2.cjs +0 -223
- package/dist/components/Heading2.js +0 -8
- package/dist/components/Heading3.cjs +0 -223
- package/dist/components/Heading3.js +0 -8
- package/dist/icons-light-QXLRBPC4.woff2 +0 -0
- package/dist/icons-normal-MJATZ73K.woff2 +0 -0
- package/dist/millwork.css +0 -4
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Theme
|
|
3
|
+
} from "../chunk-I2UVVKQI.js";
|
|
4
|
+
import {
|
|
5
|
+
Stack
|
|
6
|
+
} from "../chunk-U42SKNR6.js";
|
|
7
|
+
import {
|
|
8
|
+
Heading3
|
|
9
|
+
} from "../chunk-TYI74BSP.js";
|
|
10
|
+
import {
|
|
11
|
+
Button
|
|
12
|
+
} from "../chunk-KENSVWOY.js";
|
|
13
|
+
import {
|
|
14
|
+
Paragraph
|
|
15
|
+
} from "../chunk-K3IKUSZW.js";
|
|
16
|
+
import {
|
|
17
|
+
Icon
|
|
18
|
+
} from "../chunk-IGQVA7SC.js";
|
|
19
|
+
import "../chunk-KX3O6GJ6.js";
|
|
20
|
+
import "../chunk-ORMEWXMH.js";
|
|
21
|
+
|
|
22
|
+
// src/components/MobileDataGrid.tsx
|
|
23
|
+
import clsx from "clsx";
|
|
24
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
25
|
+
function MobileDataGrid({
|
|
26
|
+
columns,
|
|
27
|
+
data,
|
|
28
|
+
header,
|
|
29
|
+
getId,
|
|
30
|
+
renderLink,
|
|
31
|
+
renderChevron
|
|
32
|
+
}) {
|
|
33
|
+
return /* @__PURE__ */ jsxs(
|
|
34
|
+
"div",
|
|
35
|
+
{
|
|
36
|
+
className: clsx(
|
|
37
|
+
"rounded",
|
|
38
|
+
"overflow-hidden",
|
|
39
|
+
"divide-y divide-border-primary-normal",
|
|
40
|
+
"border border-border-primary-normal",
|
|
41
|
+
"overflow-y-scroll scrollbar-thin"
|
|
42
|
+
),
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(MobileDataGridHeader, { header }),
|
|
45
|
+
data.map((item) => /* @__PURE__ */ jsx(
|
|
46
|
+
MobileDataGridCard,
|
|
47
|
+
{
|
|
48
|
+
data: item,
|
|
49
|
+
columns,
|
|
50
|
+
renderLink,
|
|
51
|
+
renderChevron
|
|
52
|
+
},
|
|
53
|
+
getId(item)
|
|
54
|
+
))
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
function MobileDataGridHeader({ header }) {
|
|
60
|
+
return /* @__PURE__ */ jsx("div", { className: "sticky top-0", children: /* @__PURE__ */ jsx(Theme, { theme: "brand", children: /* @__PURE__ */ jsx(
|
|
61
|
+
Stack,
|
|
62
|
+
{
|
|
63
|
+
horizontal: true,
|
|
64
|
+
items: "start",
|
|
65
|
+
justify: "center",
|
|
66
|
+
backgroundColor: "background-primary-normal",
|
|
67
|
+
padding: true,
|
|
68
|
+
sizing: "component",
|
|
69
|
+
children: /* @__PURE__ */ jsx(Heading3, { as: "span", color: "text-primary-normal", children: header })
|
|
70
|
+
}
|
|
71
|
+
) }) });
|
|
72
|
+
}
|
|
73
|
+
function MobileDataGridCard({
|
|
74
|
+
data,
|
|
75
|
+
columns,
|
|
76
|
+
renderLink,
|
|
77
|
+
renderChevron
|
|
78
|
+
}) {
|
|
79
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
80
|
+
/* @__PURE__ */ jsxs(Stack, { sizing: "component", padding: true, children: [
|
|
81
|
+
/* @__PURE__ */ jsxs(Stack, { horizontal: true, horizontalMobile: true, items: "center", justify: "between", children: [
|
|
82
|
+
renderLink && renderLink(data),
|
|
83
|
+
/* @__PURE__ */ jsxs(Stack, { horizontal: true, horizontalMobile: true, items: "center", justify: "end", children: [
|
|
84
|
+
/* @__PURE__ */ jsx(
|
|
85
|
+
Button,
|
|
86
|
+
{
|
|
87
|
+
iconOnly: true,
|
|
88
|
+
variant: "tertiary",
|
|
89
|
+
onClick: () => console.log("Edit", data.id),
|
|
90
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "docs" })
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
Button,
|
|
95
|
+
{
|
|
96
|
+
iconOnly: true,
|
|
97
|
+
variant: "tertiary",
|
|
98
|
+
onClick: () => console.log("Edit", data.id),
|
|
99
|
+
leftIcon: /* @__PURE__ */ jsx(Icon, { name: "swap_vert" })
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
] })
|
|
103
|
+
] }),
|
|
104
|
+
columns.filter((x) => x.show).map((column) => /* @__PURE__ */ jsxs(
|
|
105
|
+
"div",
|
|
106
|
+
{
|
|
107
|
+
className: "mb-2 grid grid-cols-2",
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ jsxs(Paragraph, { color: "text-secondary-normal", className: "text-left", children: [
|
|
110
|
+
column.header,
|
|
111
|
+
":"
|
|
112
|
+
] }),
|
|
113
|
+
" ",
|
|
114
|
+
column.cell ? column.cell({ row: data }) : String(data[column.accessorKey])
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
String(column.accessorKey)
|
|
118
|
+
))
|
|
119
|
+
] }),
|
|
120
|
+
renderChevron && /* @__PURE__ */ jsx(Stack, { items: "center", justify: "center", horizontal: true, horizontalMobile: true, children: renderChevron(data) })
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
123
|
+
export {
|
|
124
|
+
MobileDataGrid
|
|
125
|
+
};
|
|
@@ -63,8 +63,8 @@ __export(Modal_exports, {
|
|
|
63
63
|
Modal: () => Modal
|
|
64
64
|
});
|
|
65
65
|
module.exports = __toCommonJS(Modal_exports);
|
|
66
|
-
var
|
|
67
|
-
var
|
|
66
|
+
var import_clsx7 = __toESM(require("clsx"), 1);
|
|
67
|
+
var import_react3 = require("react");
|
|
68
68
|
|
|
69
69
|
// src/components/Heading.tsx
|
|
70
70
|
var import_clsx2 = __toESM(require("clsx"), 1);
|
|
@@ -400,10 +400,18 @@ function Icon(_a) {
|
|
|
400
400
|
|
|
401
401
|
// src/components/ModalHeader.tsx
|
|
402
402
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
403
|
-
var ModalHeader = ({
|
|
403
|
+
var ModalHeader = ({
|
|
404
|
+
title,
|
|
405
|
+
hideCloseIcon,
|
|
406
|
+
headerIcon,
|
|
407
|
+
onClose
|
|
408
|
+
}) => {
|
|
404
409
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex justify-between items-center p-mobile-container-padding desktop:p-desktop-container-padding compact:p-desktop-compact-container-padding gap-mobile-container-gap desktop:gap-desktop-container-gap compact:gap-desktop-compact-container-gap", children: [
|
|
405
|
-
|
|
406
|
-
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
411
|
+
headerIcon,
|
|
412
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Heading2, { as: "p", children: title })
|
|
413
|
+
] }),
|
|
414
|
+
!hideCloseIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
407
415
|
Button,
|
|
408
416
|
{
|
|
409
417
|
iconOnly: true,
|
|
@@ -417,16 +425,33 @@ var ModalHeader = ({ title, onClose }) => {
|
|
|
417
425
|
ModalHeader.displayName = "ModalHeader";
|
|
418
426
|
|
|
419
427
|
// src/components/ModalContent.tsx
|
|
428
|
+
var import_clsx5 = __toESM(require("clsx"), 1);
|
|
420
429
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
421
|
-
function ModalContent({
|
|
422
|
-
|
|
430
|
+
function ModalContent({
|
|
431
|
+
fixedHeightScrolling,
|
|
432
|
+
children
|
|
433
|
+
}) {
|
|
434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
435
|
+
"div",
|
|
436
|
+
{
|
|
437
|
+
className: (0, import_clsx5.default)(
|
|
438
|
+
"flex-grow desktop:flex-grow-0 p-4",
|
|
439
|
+
fixedHeightScrolling && "overflow-auto"
|
|
440
|
+
),
|
|
441
|
+
children
|
|
442
|
+
}
|
|
443
|
+
);
|
|
423
444
|
}
|
|
424
445
|
ModalContent.displayName = "ModalContent";
|
|
425
446
|
|
|
426
447
|
// src/components/ModalButtons.tsx
|
|
427
448
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
428
|
-
var ModalButtons = ({
|
|
429
|
-
|
|
449
|
+
var ModalButtons = ({
|
|
450
|
+
onClose,
|
|
451
|
+
onContinue,
|
|
452
|
+
customActions
|
|
453
|
+
}) => {
|
|
454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "border-t border-neutral-300 p-4 flex justify-end space-x-2", children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
430
455
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
431
456
|
Button,
|
|
432
457
|
{
|
|
@@ -447,33 +472,32 @@ var ModalButtons = ({ onClose, onContinue }) => {
|
|
|
447
472
|
children: "Continue"
|
|
448
473
|
}
|
|
449
474
|
)
|
|
450
|
-
] });
|
|
475
|
+
] }) });
|
|
451
476
|
};
|
|
452
477
|
ModalButtons.displayName = "ModalButtons";
|
|
453
478
|
|
|
454
479
|
// src/components/ModalScrim.tsx
|
|
455
|
-
var
|
|
480
|
+
var import_clsx6 = __toESM(require("clsx"), 1);
|
|
456
481
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
457
482
|
var ModalScrim = ({
|
|
458
483
|
show = false,
|
|
484
|
+
size = "small",
|
|
459
485
|
children,
|
|
460
486
|
onClick,
|
|
461
487
|
ref
|
|
462
488
|
}) => {
|
|
463
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.
|
|
489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
464
490
|
"div",
|
|
465
491
|
{
|
|
466
|
-
className: (0,
|
|
467
|
-
"transition-[visibility,opacity,background] ease-in-out duration-100 grid place-content-center p-4 group bg-neutral-600/50 fixed opacity-0",
|
|
492
|
+
className: (0, import_clsx6.default)(
|
|
493
|
+
"overflow-y-auto h-screen transition-[visibility,opacity,background] ease-in-out duration-100 grid place-content-center desktop:p-4 group bg-neutral-600/50 fixed opacity-0",
|
|
468
494
|
!show && " pointer-events-none",
|
|
495
|
+
size === "small" && "p-4",
|
|
469
496
|
"inset-0 z-50"
|
|
470
497
|
),
|
|
471
498
|
onMouseDown: onClick,
|
|
472
499
|
ref,
|
|
473
|
-
children
|
|
474
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { children: show }),
|
|
475
|
-
children
|
|
476
|
-
]
|
|
500
|
+
children
|
|
477
501
|
}
|
|
478
502
|
);
|
|
479
503
|
};
|
|
@@ -508,11 +532,35 @@ function findDocumentRoot(element) {
|
|
|
508
532
|
// src/components/Modal.tsx
|
|
509
533
|
var import_react_use = require("react-use");
|
|
510
534
|
|
|
511
|
-
// src/components/
|
|
535
|
+
// src/components/useMatchesMedia.tsx
|
|
512
536
|
var import_react = require("react");
|
|
537
|
+
var useMatchesMedia = (query) => {
|
|
538
|
+
const [matches, setMatches] = (0, import_react.useState)(
|
|
539
|
+
() => typeof window !== "undefined" ? window.matchMedia(query).matches : false
|
|
540
|
+
);
|
|
541
|
+
(0, import_react.useLayoutEffect)(() => {
|
|
542
|
+
const mediaQueryList = window.matchMedia(query);
|
|
543
|
+
const listener = (event) => {
|
|
544
|
+
setMatches(event.matches);
|
|
545
|
+
};
|
|
546
|
+
mediaQueryList.addEventListener("change", listener);
|
|
547
|
+
setMatches(mediaQueryList.matches);
|
|
548
|
+
return () => {
|
|
549
|
+
mediaQueryList.removeEventListener("change", listener);
|
|
550
|
+
};
|
|
551
|
+
}, [query]);
|
|
552
|
+
return matches;
|
|
553
|
+
};
|
|
554
|
+
var useMatchesMobile = () => {
|
|
555
|
+
const isMobile = useMatchesMedia("(width < 48rem)");
|
|
556
|
+
return isMobile;
|
|
557
|
+
};
|
|
558
|
+
|
|
559
|
+
// src/components/useMounted.tsx
|
|
560
|
+
var import_react2 = require("react");
|
|
513
561
|
var useMounted = () => {
|
|
514
|
-
const [isMounted, setIsMounted] = (0,
|
|
515
|
-
(0,
|
|
562
|
+
const [isMounted, setIsMounted] = (0, import_react2.useState)(false);
|
|
563
|
+
(0, import_react2.useEffect)(() => {
|
|
516
564
|
setIsMounted(true);
|
|
517
565
|
return () => setIsMounted(false);
|
|
518
566
|
}, []);
|
|
@@ -566,16 +614,16 @@ var whenAllAnimationsFinish = (animations, callback) => {
|
|
|
566
614
|
};
|
|
567
615
|
var sizes = {
|
|
568
616
|
small: {
|
|
569
|
-
sizeClass: "max-w-120"
|
|
617
|
+
sizeClass: "max-h-screen desktop:max-w-120 rounded-sm"
|
|
570
618
|
},
|
|
571
619
|
medium: {
|
|
572
|
-
sizeClass: "max-w-180"
|
|
620
|
+
sizeClass: "desktop:max-w-180 w-screen desktop:h-fit h-screen desktop:w-full max-w-240"
|
|
573
621
|
},
|
|
574
622
|
large: {
|
|
575
|
-
sizeClass: "max-w-240"
|
|
623
|
+
sizeClass: "desktop:max-w-240 w-screen desktop:h-fit h-screen desktop:w-full max-w-240"
|
|
576
624
|
},
|
|
577
625
|
"x-large": {
|
|
578
|
-
sizeClass: "max-w-300"
|
|
626
|
+
sizeClass: "desktop:max-w-300 w-screen desktop:h-fit h-screen desktop:w-full max-w-240"
|
|
579
627
|
}
|
|
580
628
|
};
|
|
581
629
|
var Modal = ({
|
|
@@ -587,15 +635,20 @@ var Modal = ({
|
|
|
587
635
|
onClose,
|
|
588
636
|
onContinue,
|
|
589
637
|
closeOnBackdropClick = true,
|
|
590
|
-
showButtons = false
|
|
638
|
+
showButtons = false,
|
|
639
|
+
hideCloseIcon = false,
|
|
640
|
+
headerIcon,
|
|
641
|
+
fixedHeightScrolling = false,
|
|
642
|
+
customActions
|
|
591
643
|
}) => {
|
|
592
644
|
var _a;
|
|
593
645
|
const mounted = useMounted();
|
|
594
|
-
const modalRef = (0,
|
|
595
|
-
const bgRef = (0,
|
|
646
|
+
const modalRef = (0, import_react3.useRef)(null);
|
|
647
|
+
const bgRef = (0, import_react3.useRef)(null);
|
|
596
648
|
const wasOpen = (0, import_react_use.usePrevious)(open);
|
|
597
|
-
|
|
598
|
-
|
|
649
|
+
const isMobile = useMatchesMobile();
|
|
650
|
+
const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
|
|
651
|
+
(0, import_react3.useEffect)(() => {
|
|
599
652
|
if (!mounted) return;
|
|
600
653
|
if (!modalRef.current || !bgRef.current) {
|
|
601
654
|
console.error("Modal or background reference is not set.");
|
|
@@ -603,7 +656,6 @@ var Modal = ({
|
|
|
603
656
|
}
|
|
604
657
|
if (wasOpen === void 0) return;
|
|
605
658
|
if (wasOpen && !open) {
|
|
606
|
-
console.log('"Closing modal"');
|
|
607
659
|
const modalAnimation = fadeOutScale(modalRef.current);
|
|
608
660
|
const bgAnimation = bgFadeOut(bgRef.current);
|
|
609
661
|
whenAllAnimationsFinish([modalAnimation, bgAnimation], () => {
|
|
@@ -612,12 +664,11 @@ var Modal = ({
|
|
|
612
664
|
}
|
|
613
665
|
});
|
|
614
666
|
} else if (!wasOpen && open) {
|
|
615
|
-
console.log('"Opening modal"');
|
|
616
667
|
fadeInScale(modalRef.current);
|
|
617
668
|
bgFadeIn(bgRef.current);
|
|
618
669
|
}
|
|
619
670
|
}, [mounted, open]);
|
|
620
|
-
const handleKeyDown = (0,
|
|
671
|
+
const handleKeyDown = (0, import_react3.useCallback)(
|
|
621
672
|
(e) => {
|
|
622
673
|
if (e.key === "Escape") {
|
|
623
674
|
if (onClose) {
|
|
@@ -628,12 +679,12 @@ var Modal = ({
|
|
|
628
679
|
},
|
|
629
680
|
[onClose, bgRef, modalRef]
|
|
630
681
|
);
|
|
631
|
-
const handleClose = (0,
|
|
682
|
+
const handleClose = (0, import_react3.useCallback)(() => {
|
|
632
683
|
if (onClose) {
|
|
633
684
|
onClose();
|
|
634
685
|
}
|
|
635
686
|
}, [onClose]);
|
|
636
|
-
(0,
|
|
687
|
+
(0, import_react3.useEffect)(() => {
|
|
637
688
|
if (open) {
|
|
638
689
|
document.addEventListener("keyup", handleKeyDown);
|
|
639
690
|
}
|
|
@@ -641,12 +692,31 @@ var Modal = ({
|
|
|
641
692
|
document.removeEventListener("keyup", handleKeyDown);
|
|
642
693
|
};
|
|
643
694
|
}, [open, handleKeyDown]);
|
|
695
|
+
(0, import_react3.useEffect)(() => {
|
|
696
|
+
if (!open) return;
|
|
697
|
+
const scrollY = window.scrollY;
|
|
698
|
+
const body = document.body;
|
|
699
|
+
body.style.position = "fixed";
|
|
700
|
+
body.style.top = `-${scrollY}px`;
|
|
701
|
+
body.style.left = "0";
|
|
702
|
+
body.style.right = "0";
|
|
703
|
+
body.style.overflow = "hidden";
|
|
704
|
+
body.style.width = "100%";
|
|
705
|
+
return () => {
|
|
706
|
+
body.style.position = "";
|
|
707
|
+
body.style.top = "";
|
|
708
|
+
body.style.left = "";
|
|
709
|
+
body.style.right = "";
|
|
710
|
+
body.style.overflow = "";
|
|
711
|
+
body.style.width = "";
|
|
712
|
+
window.scrollTo(0, scrollY);
|
|
713
|
+
};
|
|
714
|
+
}, [open]);
|
|
644
715
|
const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
|
|
645
|
-
const backgroundClickHandler = (0,
|
|
716
|
+
const backgroundClickHandler = (0, import_react3.useCallback)(
|
|
646
717
|
(e) => {
|
|
647
718
|
const target = e.target;
|
|
648
719
|
const currentTarget = e.currentTarget;
|
|
649
|
-
console.log(currentTarget, target, currentTarget.contains(target));
|
|
650
720
|
if (currentTarget.contains(target) && currentTarget !== target) {
|
|
651
721
|
e.stopPropagation();
|
|
652
722
|
return;
|
|
@@ -661,23 +731,48 @@ var Modal = ({
|
|
|
661
731
|
return null;
|
|
662
732
|
}
|
|
663
733
|
return (0, import_react_dom.createPortal)(
|
|
664
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
665
|
-
|
|
734
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
735
|
+
ModalScrim,
|
|
666
736
|
{
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
737
|
+
size,
|
|
738
|
+
ref: bgRef,
|
|
739
|
+
show: open,
|
|
740
|
+
onClick: backgroundClickHandler,
|
|
741
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
742
|
+
"div",
|
|
743
|
+
{
|
|
744
|
+
ref: modalRef,
|
|
745
|
+
className: (0, import_clsx7.default)(
|
|
746
|
+
"bg-white shadow-md rounded-sm flex flex-col overflow-hidden w-full opacity-0 h-fit",
|
|
747
|
+
computedFixedHeightScrolling && "desktop:max-h-[calc(100vh-32px)] desktop:h-auto",
|
|
748
|
+
className,
|
|
749
|
+
sizeClass
|
|
750
|
+
),
|
|
751
|
+
onClick: (e) => e.stopPropagation(),
|
|
752
|
+
children: [
|
|
753
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
754
|
+
ModalHeader,
|
|
755
|
+
{
|
|
756
|
+
title,
|
|
757
|
+
onClose: handleClose,
|
|
758
|
+
hideCloseIcon,
|
|
759
|
+
headerIcon
|
|
760
|
+
}
|
|
761
|
+
),
|
|
762
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ModalContent, { fixedHeightScrolling: computedFixedHeightScrolling, children }),
|
|
763
|
+
showButtons && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
764
|
+
ModalButtons,
|
|
765
|
+
{
|
|
766
|
+
onClose: handleClose,
|
|
767
|
+
onContinue,
|
|
768
|
+
customActions
|
|
769
|
+
}
|
|
770
|
+
)
|
|
771
|
+
]
|
|
772
|
+
}
|
|
773
|
+
)
|
|
679
774
|
}
|
|
680
|
-
)
|
|
775
|
+
),
|
|
681
776
|
findDocumentRoot(bgRef.current)
|
|
682
777
|
);
|
|
683
778
|
};
|
package/dist/components/Modal.js
CHANGED
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
import {
|
|
3
3
|
useMounted
|
|
4
4
|
} from "../chunk-4RJKB7LC.js";
|
|
5
|
+
import {
|
|
6
|
+
ModalButtons
|
|
7
|
+
} from "../chunk-6ZY524ID.js";
|
|
5
8
|
import {
|
|
6
9
|
ModalContent
|
|
7
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-Q3FKEKIN.js";
|
|
8
11
|
import {
|
|
9
12
|
ModalHeader
|
|
10
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-XUIPGYP5.js";
|
|
11
14
|
import {
|
|
12
15
|
ModalScrim
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import {
|
|
15
|
-
ModalButtons
|
|
16
|
-
} from "../chunk-25Y2OMTD.js";
|
|
16
|
+
} from "../chunk-TU55CHXU.js";
|
|
17
17
|
import "../chunk-TYI74BSP.js";
|
|
18
|
+
import {
|
|
19
|
+
useMatchesMobile
|
|
20
|
+
} from "../chunk-SEKKGFM6.js";
|
|
18
21
|
import {
|
|
19
22
|
findDocumentRoot
|
|
20
23
|
} from "../chunk-4T7F5BZZ.js";
|
|
@@ -74,16 +77,16 @@ var whenAllAnimationsFinish = (animations, callback) => {
|
|
|
74
77
|
};
|
|
75
78
|
var sizes = {
|
|
76
79
|
small: {
|
|
77
|
-
sizeClass: "max-w-120"
|
|
80
|
+
sizeClass: "max-h-screen desktop:max-w-120 rounded-sm"
|
|
78
81
|
},
|
|
79
82
|
medium: {
|
|
80
|
-
sizeClass: "max-w-180"
|
|
83
|
+
sizeClass: "desktop:max-w-180 w-screen desktop:h-fit h-screen desktop:w-full max-w-240"
|
|
81
84
|
},
|
|
82
85
|
large: {
|
|
83
|
-
sizeClass: "max-w-240"
|
|
86
|
+
sizeClass: "desktop:max-w-240 w-screen desktop:h-fit h-screen desktop:w-full max-w-240"
|
|
84
87
|
},
|
|
85
88
|
"x-large": {
|
|
86
|
-
sizeClass: "max-w-300"
|
|
89
|
+
sizeClass: "desktop:max-w-300 w-screen desktop:h-fit h-screen desktop:w-full max-w-240"
|
|
87
90
|
}
|
|
88
91
|
};
|
|
89
92
|
var Modal = ({
|
|
@@ -95,15 +98,20 @@ var Modal = ({
|
|
|
95
98
|
onClose,
|
|
96
99
|
onContinue,
|
|
97
100
|
closeOnBackdropClick = true,
|
|
98
|
-
showButtons = false
|
|
101
|
+
showButtons = false,
|
|
102
|
+
hideCloseIcon = false,
|
|
103
|
+
headerIcon,
|
|
104
|
+
fixedHeightScrolling = false,
|
|
105
|
+
customActions
|
|
99
106
|
}) => {
|
|
100
107
|
var _a;
|
|
101
108
|
const mounted = useMounted();
|
|
102
109
|
const modalRef = useRef(null);
|
|
103
110
|
const bgRef = useRef(null);
|
|
104
111
|
const wasOpen = usePrevious(open);
|
|
112
|
+
const isMobile = useMatchesMobile();
|
|
113
|
+
const computedFixedHeightScrolling = isMobile || fixedHeightScrolling;
|
|
105
114
|
useEffect(() => {
|
|
106
|
-
console.log("was open", wasOpen, open);
|
|
107
115
|
if (!mounted) return;
|
|
108
116
|
if (!modalRef.current || !bgRef.current) {
|
|
109
117
|
console.error("Modal or background reference is not set.");
|
|
@@ -111,7 +119,6 @@ var Modal = ({
|
|
|
111
119
|
}
|
|
112
120
|
if (wasOpen === void 0) return;
|
|
113
121
|
if (wasOpen && !open) {
|
|
114
|
-
console.log('"Closing modal"');
|
|
115
122
|
const modalAnimation = fadeOutScale(modalRef.current);
|
|
116
123
|
const bgAnimation = bgFadeOut(bgRef.current);
|
|
117
124
|
whenAllAnimationsFinish([modalAnimation, bgAnimation], () => {
|
|
@@ -120,7 +127,6 @@ var Modal = ({
|
|
|
120
127
|
}
|
|
121
128
|
});
|
|
122
129
|
} else if (!wasOpen && open) {
|
|
123
|
-
console.log('"Opening modal"');
|
|
124
130
|
fadeInScale(modalRef.current);
|
|
125
131
|
bgFadeIn(bgRef.current);
|
|
126
132
|
}
|
|
@@ -149,12 +155,31 @@ var Modal = ({
|
|
|
149
155
|
document.removeEventListener("keyup", handleKeyDown);
|
|
150
156
|
};
|
|
151
157
|
}, [open, handleKeyDown]);
|
|
158
|
+
useEffect(() => {
|
|
159
|
+
if (!open) return;
|
|
160
|
+
const scrollY = window.scrollY;
|
|
161
|
+
const body = document.body;
|
|
162
|
+
body.style.position = "fixed";
|
|
163
|
+
body.style.top = `-${scrollY}px`;
|
|
164
|
+
body.style.left = "0";
|
|
165
|
+
body.style.right = "0";
|
|
166
|
+
body.style.overflow = "hidden";
|
|
167
|
+
body.style.width = "100%";
|
|
168
|
+
return () => {
|
|
169
|
+
body.style.position = "";
|
|
170
|
+
body.style.top = "";
|
|
171
|
+
body.style.left = "";
|
|
172
|
+
body.style.right = "";
|
|
173
|
+
body.style.overflow = "";
|
|
174
|
+
body.style.width = "";
|
|
175
|
+
window.scrollTo(0, scrollY);
|
|
176
|
+
};
|
|
177
|
+
}, [open]);
|
|
152
178
|
const { sizeClass } = (_a = sizes[size]) != null ? _a : sizes.small;
|
|
153
179
|
const backgroundClickHandler = useCallback(
|
|
154
180
|
(e) => {
|
|
155
181
|
const target = e.target;
|
|
156
182
|
const currentTarget = e.currentTarget;
|
|
157
|
-
console.log(currentTarget, target, currentTarget.contains(target));
|
|
158
183
|
if (currentTarget.contains(target) && currentTarget !== target) {
|
|
159
184
|
e.stopPropagation();
|
|
160
185
|
return;
|
|
@@ -169,23 +194,48 @@ var Modal = ({
|
|
|
169
194
|
return null;
|
|
170
195
|
}
|
|
171
196
|
return createPortal(
|
|
172
|
-
/* @__PURE__ */ jsx(
|
|
173
|
-
|
|
197
|
+
/* @__PURE__ */ jsx(
|
|
198
|
+
ModalScrim,
|
|
174
199
|
{
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
200
|
+
size,
|
|
201
|
+
ref: bgRef,
|
|
202
|
+
show: open,
|
|
203
|
+
onClick: backgroundClickHandler,
|
|
204
|
+
children: /* @__PURE__ */ jsxs(
|
|
205
|
+
"div",
|
|
206
|
+
{
|
|
207
|
+
ref: modalRef,
|
|
208
|
+
className: clsx(
|
|
209
|
+
"bg-white shadow-md rounded-sm flex flex-col overflow-hidden w-full opacity-0 h-fit",
|
|
210
|
+
computedFixedHeightScrolling && "desktop:max-h-[calc(100vh-32px)] desktop:h-auto",
|
|
211
|
+
className,
|
|
212
|
+
sizeClass
|
|
213
|
+
),
|
|
214
|
+
onClick: (e) => e.stopPropagation(),
|
|
215
|
+
children: [
|
|
216
|
+
/* @__PURE__ */ jsx(
|
|
217
|
+
ModalHeader,
|
|
218
|
+
{
|
|
219
|
+
title,
|
|
220
|
+
onClose: handleClose,
|
|
221
|
+
hideCloseIcon,
|
|
222
|
+
headerIcon
|
|
223
|
+
}
|
|
224
|
+
),
|
|
225
|
+
children && /* @__PURE__ */ jsx(ModalContent, { fixedHeightScrolling: computedFixedHeightScrolling, children }),
|
|
226
|
+
showButtons && /* @__PURE__ */ jsx(
|
|
227
|
+
ModalButtons,
|
|
228
|
+
{
|
|
229
|
+
onClose: handleClose,
|
|
230
|
+
onContinue,
|
|
231
|
+
customActions
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
)
|
|
187
237
|
}
|
|
188
|
-
)
|
|
238
|
+
),
|
|
189
239
|
findDocumentRoot(bgRef.current)
|
|
190
240
|
);
|
|
191
241
|
};
|
|
@@ -350,8 +350,12 @@ function Icon(_a) {
|
|
|
350
350
|
|
|
351
351
|
// src/components/ModalButtons.tsx
|
|
352
352
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
353
|
-
var ModalButtons = ({
|
|
354
|
-
|
|
353
|
+
var ModalButtons = ({
|
|
354
|
+
onClose,
|
|
355
|
+
onContinue,
|
|
356
|
+
customActions
|
|
357
|
+
}) => {
|
|
358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "border-t border-neutral-300 p-4 flex justify-end space-x-2", children: customActions != null ? customActions : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
355
359
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
356
360
|
Button,
|
|
357
361
|
{
|
|
@@ -372,7 +376,7 @@ var ModalButtons = ({ onClose, onContinue }) => {
|
|
|
372
376
|
children: "Continue"
|
|
373
377
|
}
|
|
374
378
|
)
|
|
375
|
-
] });
|
|
379
|
+
] }) });
|
|
376
380
|
};
|
|
377
381
|
ModalButtons.displayName = "ModalButtons";
|
|
378
382
|
// Annotate the CommonJS export names for ESM import in node:
|