@dmsi/wedgekit-react 0.0.5 → 0.0.6
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
package/src/components/Time.tsx
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode, useEffect, useRef, useState } from "react";
|
|
2
2
|
import { InputBase } from "./Input";
|
|
3
|
-
import { Surface } from "./Surface";
|
|
4
3
|
import { createPortal } from "react-dom";
|
|
5
4
|
import clsx from "clsx";
|
|
6
5
|
import { typography } from "../classNames";
|
|
7
6
|
import { Icon } from "./Icon";
|
|
8
7
|
import { findDocumentRoot } from "../utils";
|
|
8
|
+
import { Stack } from "./Stack";
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
extends Omit<
|
|
12
|
-
ComponentProps<"input">,
|
|
13
|
-
"type" | "children" | "dangerouslySetInnerHTML"
|
|
14
|
-
> {
|
|
10
|
+
type TimeProps = {
|
|
15
11
|
label?: string;
|
|
16
12
|
error?: boolean;
|
|
17
13
|
readOnly?: boolean;
|
|
18
14
|
caption?: ReactNode;
|
|
19
15
|
format?: "12h" | "24h";
|
|
20
|
-
}
|
|
16
|
+
} & Omit<ComponentProps<"input">, "type" | "children" | "dangerouslySetInnerHTML">;
|
|
21
17
|
|
|
22
18
|
const timePickerScrollableStyle = "overflow-auto max-h-full py-4 no-scrollbar";
|
|
23
19
|
|
|
@@ -25,6 +21,7 @@ export const Time = ({ onChange, format = "12h", ...props }: TimeProps) => {
|
|
|
25
21
|
const [showTimePicker, setShowTimePicker] = useState(false);
|
|
26
22
|
const [hasInteracted, setHasInteracted] = useState(false);
|
|
27
23
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
24
|
+
const inputContainerRef = useRef<HTMLLabelElement>(null);
|
|
28
25
|
const timeRef = useRef<HTMLDivElement>(null);
|
|
29
26
|
const [timePosition, setTimePosition] = useState({
|
|
30
27
|
top: 0,
|
|
@@ -49,36 +46,21 @@ export const Time = ({ onChange, format = "12h", ...props }: TimeProps) => {
|
|
|
49
46
|
: "";
|
|
50
47
|
|
|
51
48
|
const updatePosition = () => {
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
top: rect.bottom + window.scrollY + 6,
|
|
59
|
-
left: rect.left + window.scrollX,
|
|
60
|
-
width: rect.width,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
49
|
+
if (inputContainerRef.current) {
|
|
50
|
+
const rect = inputContainerRef.current.getBoundingClientRect();
|
|
51
|
+
setTimePosition({
|
|
52
|
+
top: rect.bottom + window.scrollY + 6,
|
|
53
|
+
left: rect.left + window.scrollX,
|
|
54
|
+
width: rect.width,
|
|
63
55
|
});
|
|
64
56
|
}
|
|
65
57
|
};
|
|
66
58
|
|
|
67
59
|
useEffect(() => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const resizeObserver = new ResizeObserver(updatePosition);
|
|
71
|
-
if (inputRef.current) {
|
|
72
|
-
resizeObserver.observe(inputRef.current);
|
|
60
|
+
if (showTimePicker) {
|
|
61
|
+
updatePosition();
|
|
73
62
|
}
|
|
74
|
-
|
|
75
|
-
window.addEventListener("scroll", updatePosition);
|
|
76
|
-
|
|
77
|
-
return () => {
|
|
78
|
-
resizeObserver.disconnect();
|
|
79
|
-
window.removeEventListener("scroll", updatePosition);
|
|
80
|
-
};
|
|
81
|
-
}, []);
|
|
63
|
+
}, [showTimePicker, is12HourFormat]);
|
|
82
64
|
|
|
83
65
|
useEffect(() => {
|
|
84
66
|
const handleClickOutside = (event: MouseEvent) => {
|
|
@@ -99,7 +81,7 @@ export const Time = ({ onChange, format = "12h", ...props }: TimeProps) => {
|
|
|
99
81
|
return () => {
|
|
100
82
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
101
83
|
};
|
|
102
|
-
}, [showTimePicker]);
|
|
84
|
+
}, [showTimePicker, is12HourFormat]);
|
|
103
85
|
|
|
104
86
|
useEffect(() => {
|
|
105
87
|
if (formattedTime && hasInteracted) {
|
|
@@ -201,6 +183,12 @@ export const Time = ({ onChange, format = "12h", ...props }: TimeProps) => {
|
|
|
201
183
|
onChange?.(e);
|
|
202
184
|
};
|
|
203
185
|
|
|
186
|
+
const selectedRefs = {
|
|
187
|
+
hour: useRef<HTMLButtonElement | null>(null),
|
|
188
|
+
minute: useRef<HTMLButtonElement | null>(null),
|
|
189
|
+
meridiem: useRef<HTMLButtonElement | null>(null),
|
|
190
|
+
};
|
|
191
|
+
|
|
204
192
|
const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
|
205
193
|
if (e.key === "Enter") {
|
|
206
194
|
setShowTimePicker(false);
|
|
@@ -273,40 +261,27 @@ export const Time = ({ onChange, format = "12h", ...props }: TimeProps) => {
|
|
|
273
261
|
if (is12HourFormat) setMeridiem(mer);
|
|
274
262
|
};
|
|
275
263
|
|
|
276
|
-
const selectedRefs = {
|
|
277
|
-
hour: useRef<HTMLButtonElement | null>(null),
|
|
278
|
-
minute: useRef<HTMLButtonElement | null>(null),
|
|
279
|
-
meridiem: useRef<HTMLButtonElement | null>(null),
|
|
280
|
-
};
|
|
281
|
-
|
|
282
264
|
useEffect(() => {
|
|
283
265
|
if (showTimePicker) {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
selectedRefs.minute.current?.scrollIntoView({
|
|
289
|
-
block: "center",
|
|
290
|
-
behavior: "instant",
|
|
291
|
-
});
|
|
292
|
-
if (is12HourFormat) {
|
|
293
|
-
selectedRefs.meridiem.current?.scrollIntoView({
|
|
294
|
-
block: "center",
|
|
266
|
+
// Use a slight delay to ensure DOM is updated
|
|
267
|
+
setTimeout(() => {
|
|
268
|
+
selectedRefs.hour.current?.scrollIntoView({
|
|
269
|
+
block: "nearest",
|
|
295
270
|
behavior: "instant",
|
|
296
271
|
});
|
|
297
|
-
|
|
272
|
+
selectedRefs.minute.current?.scrollIntoView({
|
|
273
|
+
block: "nearest",
|
|
274
|
+
behavior: "instant",
|
|
275
|
+
});
|
|
276
|
+
if (is12HourFormat) {
|
|
277
|
+
selectedRefs.meridiem.current?.scrollIntoView({
|
|
278
|
+
block: "nearest",
|
|
279
|
+
behavior: "instant",
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
}, 0);
|
|
298
283
|
}
|
|
299
|
-
}, [
|
|
300
|
-
showTimePicker,
|
|
301
|
-
hour,
|
|
302
|
-
minute,
|
|
303
|
-
meridiem,
|
|
304
|
-
is12HourFormat,
|
|
305
|
-
selectedRefs.hour,
|
|
306
|
-
selectedRefs.minute,
|
|
307
|
-
selectedRefs.meridiem,
|
|
308
|
-
]);
|
|
309
|
-
|
|
284
|
+
}, [showTimePicker, is12HourFormat, selectedRefs.hour, selectedRefs.minute, selectedRefs.meridiem]);
|
|
310
285
|
const renderOptions = (
|
|
311
286
|
items: string[],
|
|
312
287
|
type: "hour" | "minute" | "meridiem",
|
|
@@ -341,6 +316,7 @@ export const Time = ({ onChange, format = "12h", ...props }: TimeProps) => {
|
|
|
341
316
|
<InputBase
|
|
342
317
|
{...props}
|
|
343
318
|
ref={inputRef}
|
|
319
|
+
inputContainerRef={inputContainerRef}
|
|
344
320
|
value={inputValue}
|
|
345
321
|
placeholder={is12HourFormat ? "hh:mm am" : "hh:mm"}
|
|
346
322
|
after={
|
|
@@ -356,14 +332,19 @@ export const Time = ({ onChange, format = "12h", ...props }: TimeProps) => {
|
|
|
356
332
|
/>
|
|
357
333
|
{showTimePicker &&
|
|
358
334
|
createPortal(
|
|
359
|
-
<
|
|
335
|
+
<Stack
|
|
360
336
|
elevation={4}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
}
|
|
337
|
+
height={240}
|
|
338
|
+
position="absolute"
|
|
339
|
+
backgroundColor="background-grouped-primary-normal"
|
|
340
|
+
overflowX="hidden"
|
|
341
|
+
overflowY="hidden"
|
|
342
|
+
zIndex={50}
|
|
343
|
+
top={timePosition.top}
|
|
344
|
+
left={timePosition.left}
|
|
345
|
+
minWidth={timePosition.width}
|
|
346
|
+
maxWidth={0}
|
|
347
|
+
rounded
|
|
367
348
|
>
|
|
368
349
|
<div ref={timeRef} className="px-4 flex h-60">
|
|
369
350
|
<div className={clsx(timePickerScrollableStyle)}>
|
|
@@ -388,7 +369,7 @@ export const Time = ({ onChange, format = "12h", ...props }: TimeProps) => {
|
|
|
388
369
|
</div>
|
|
389
370
|
)}
|
|
390
371
|
</div>
|
|
391
|
-
</
|
|
372
|
+
</Stack>,
|
|
392
373
|
findDocumentRoot(timeRef.current),
|
|
393
374
|
)}
|
|
394
375
|
</div>
|
|
@@ -454,4 +435,4 @@ function TimeCell({
|
|
|
454
435
|
{children}
|
|
455
436
|
</button>
|
|
456
437
|
);
|
|
457
|
-
}
|
|
438
|
+
}
|
package/src/components/Toast.tsx
CHANGED
|
@@ -204,7 +204,7 @@ export const Toast = ({
|
|
|
204
204
|
<div className="flex gap-desktop-layout-group-gap items-center">
|
|
205
205
|
<div className="flex flex-col gap-desktop-component-gap w-68">
|
|
206
206
|
{title && <Heading3>{title}</Heading3>}
|
|
207
|
-
{message && <Paragraph
|
|
207
|
+
{message && <Paragraph>{message}</Paragraph>}
|
|
208
208
|
</div>
|
|
209
209
|
{showViewButton && (
|
|
210
210
|
<Button variant="tertiary" href={viewButtonLink}>
|
package/src/darkmode.css
CHANGED
|
@@ -11,11 +11,16 @@
|
|
|
11
11
|
--color-text-secondary-error: var(--color-critical-300);
|
|
12
12
|
|
|
13
13
|
--color-text-success-normal: var(--color-success-200);
|
|
14
|
+
--color-text-success-disabled: var(--color-neutral-300);
|
|
15
|
+
--color-text-success-error: var(--color-critical-300);
|
|
16
|
+
|
|
14
17
|
--color-text-warning-normal: var(--color-warning-200);
|
|
18
|
+
--color-text-warning-disabled: var(--color-neutral-300);
|
|
19
|
+
--color-text-warning-error: var(--color-critical-300);
|
|
15
20
|
|
|
16
|
-
--color-text-link-normal: var(--color-
|
|
17
|
-
--color-text-link-hover: var(--color-
|
|
18
|
-
--color-text-link-active: var(--color-
|
|
21
|
+
--color-text-link-normal: var(--color-link-300);
|
|
22
|
+
--color-text-link-hover: var(--color-link-400);
|
|
23
|
+
--color-text-link-active: var(--color-link-200);
|
|
19
24
|
--color-text-link-disabled: var(--color-neutral-400);
|
|
20
25
|
|
|
21
26
|
--color-border-primary-normal: var(--color-neutral-400);
|
|
@@ -76,11 +81,21 @@
|
|
|
76
81
|
--color-icon-action-primary-active: var(--color-action-200);
|
|
77
82
|
--color-icon-action-primary-disabled: var(--color-neutral-400);
|
|
78
83
|
|
|
84
|
+
--color-icon-action-secondary-normal: var(--color-action-300);
|
|
85
|
+
--color-icon-action-secondary-hover: var(--color-action-400);
|
|
86
|
+
--color-icon-action-secondary-active: var(--color-action-200);
|
|
87
|
+
--color-icon-action-secondary-disabled: var(--color-neutral-400);
|
|
88
|
+
|
|
79
89
|
--color-icon-on-action-primary-normal: var(--color-neutral-600);
|
|
80
90
|
--color-icon-on-action-primary-hover: var(--color-neutral-500);
|
|
81
91
|
--color-icon-on-action-primary-active: var(--color-neutral-600);
|
|
82
92
|
--color-icon-on-action-primary-disabled: var(--color-neutral-400);
|
|
83
93
|
|
|
94
|
+
--color-icon-action-critical-normal: var(--color-critical-300);
|
|
95
|
+
--color-icon-action-critical-hover: var(--color-critical-400);
|
|
96
|
+
--color-icon-action-critical-active: var(--color-critical-200);
|
|
97
|
+
--color-icon-action-critical-disabled: var(--color-neutral-400);
|
|
98
|
+
|
|
84
99
|
--color-icon-brand-primary-normal: var(--color-brand-300);
|
|
85
100
|
--color-icon-brand-primary-hover: var(--color-brand-400);
|
|
86
101
|
--color-icon-brand-primary-active: var(--color-brand-200);
|
package/src/fonts.css
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
/* src: url("../static/icons-light.woff2") format("woff2"); - We needed icons-light with FILL option */
|
|
12
12
|
font-weight: 300;
|
|
13
13
|
font-style: normal;
|
|
14
|
+
font-display: block;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
@font-face {
|
|
@@ -18,4 +19,5 @@
|
|
|
18
19
|
src: url("../static/icons-normal[FILL].woff2") format("woff2");
|
|
19
20
|
font-weight: 400;
|
|
20
21
|
font-style: normal;
|
|
22
|
+
font-display: block;
|
|
21
23
|
}
|
package/src/index.css
CHANGED
|
@@ -36,6 +36,10 @@
|
|
|
36
36
|
--color-action-500: var(--color-action-500-user-selected, #00365a);
|
|
37
37
|
|
|
38
38
|
/* ── Link ────────────────────────────── */
|
|
39
|
+
--color-link-000: var(
|
|
40
|
+
--color-link-000-user-selected,
|
|
41
|
+
var(--color-action-000)
|
|
42
|
+
);
|
|
39
43
|
--color-link-100: var(
|
|
40
44
|
--color-link-100-user-selected,
|
|
41
45
|
var(--color-action-100)
|
|
@@ -222,11 +226,17 @@
|
|
|
222
226
|
--color-text-secondary-error: var(--color-critical-400);
|
|
223
227
|
|
|
224
228
|
--color-text-success-normal: var(--color-success-500);
|
|
229
|
+
--color-text-success-disabled: var(--color-neutral-400);
|
|
230
|
+
--color-text-success-error: var(--color-critical-400);
|
|
231
|
+
|
|
225
232
|
--color-text-warning-normal: var(--color-warning-500);
|
|
233
|
+
--color-text-warning-disabled: var(--color-neutral-400);
|
|
234
|
+
--color-text-warning-error: var(--color-critical-400);
|
|
235
|
+
|
|
226
236
|
|
|
227
|
-
--color-text-link-normal: var(--color-
|
|
228
|
-
--color-text-link-hover: var(--color-
|
|
229
|
-
--color-text-link-active: var(--color-
|
|
237
|
+
--color-text-link-normal: var(--color-link-400);
|
|
238
|
+
--color-text-link-hover: var(--color-link-500);
|
|
239
|
+
--color-text-link-active: var(--color-link-300);
|
|
230
240
|
--color-text-link-disabled: var(--color-neutral-400);
|
|
231
241
|
|
|
232
242
|
--color-border-primary-normal: var(--color-neutral-300);
|
|
@@ -323,6 +333,11 @@
|
|
|
323
333
|
--color-icon-action-primary-active: var(--color-action-300);
|
|
324
334
|
--color-icon-action-primary-disabled: var(--color-neutral-300);
|
|
325
335
|
|
|
336
|
+
--color-icon-action-secondary-normal: var(--color-action-400);
|
|
337
|
+
--color-icon-action-secondary-hover: var(--color-action-500);
|
|
338
|
+
--color-icon-action-secondary-active: var(--color-action-300);
|
|
339
|
+
--color-icon-action-secondary-disabled: var(--color-neutral-400);
|
|
340
|
+
|
|
326
341
|
--color-icon-on-action-primary-normal: var(--color-neutral-000);
|
|
327
342
|
--color-icon-on-action-primary-hover: var(--color-neutral-000);
|
|
328
343
|
--color-icon-on-action-primary-active: var(--color-neutral-000);
|
|
@@ -333,6 +348,11 @@
|
|
|
333
348
|
--color-icon-on-action-secondary-active: var(--color-action-300);
|
|
334
349
|
--color-icon-on-action-secondary-disabled: var(--color-neutral-400);
|
|
335
350
|
|
|
351
|
+
--color-icon-action-critical-normal: var(--color-critical-400);
|
|
352
|
+
--color-icon-action-critical-hover: var(--color-critical-500);
|
|
353
|
+
--color-icon-action-critical-active: var(--color-critical-300);
|
|
354
|
+
--color-icon-action-critical-disabled: var(--color-neutral-400);
|
|
355
|
+
|
|
336
356
|
--color-icon-action-critical-secondary-normal: var(--color-critical-400);
|
|
337
357
|
--color-icon-action-critical-secondary-hover: var(--color-critical-500);
|
|
338
358
|
--color-icon-action-critical-secondary-active: var(--color-critical-300);
|
package/dist/acc.css
DELETED
package/dist/agility.css
DELETED
package/dist/chunk-22YZ6LFN.js
DELETED
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Icon
|
|
3
|
-
} from "./chunk-IGQVA7SC.js";
|
|
4
|
-
import {
|
|
5
|
-
componentGap,
|
|
6
|
-
componentPadding,
|
|
7
|
-
componentPaddingXUsingComponentGap,
|
|
8
|
-
componentPaddingYUsingComponentGap,
|
|
9
|
-
paddingUsingComponentGap,
|
|
10
|
-
typography
|
|
11
|
-
} from "./chunk-JDHZQIFC.js";
|
|
12
|
-
import {
|
|
13
|
-
__objRest,
|
|
14
|
-
__spreadProps,
|
|
15
|
-
__spreadValues
|
|
16
|
-
} from "./chunk-ORMEWXMH.js";
|
|
17
|
-
|
|
18
|
-
// src/components/CalendarRange.tsx
|
|
19
|
-
import clsx from "clsx";
|
|
20
|
-
import React, { useState } from "react";
|
|
21
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
22
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
-
function isWeekend(date) {
|
|
24
|
-
return date.dayOfWeek === 6 || date.dayOfWeek === 7;
|
|
25
|
-
}
|
|
26
|
-
function DateCell(_a) {
|
|
27
|
-
var _b = _a, {
|
|
28
|
-
date,
|
|
29
|
-
isInMonth,
|
|
30
|
-
isToday,
|
|
31
|
-
isSelected,
|
|
32
|
-
inRange,
|
|
33
|
-
isDisabled,
|
|
34
|
-
isRangeStart,
|
|
35
|
-
isRangeEnd,
|
|
36
|
-
onClick,
|
|
37
|
-
onMouseEnter,
|
|
38
|
-
onMouseLeave,
|
|
39
|
-
cellPadding = "",
|
|
40
|
-
isRangeDisabled = false
|
|
41
|
-
} = _b, props = __objRest(_b, [
|
|
42
|
-
"date",
|
|
43
|
-
"isInMonth",
|
|
44
|
-
"isToday",
|
|
45
|
-
"isSelected",
|
|
46
|
-
"inRange",
|
|
47
|
-
"isDisabled",
|
|
48
|
-
"isRangeStart",
|
|
49
|
-
"isRangeEnd",
|
|
50
|
-
"onClick",
|
|
51
|
-
"onMouseEnter",
|
|
52
|
-
"onMouseLeave",
|
|
53
|
-
"cellPadding",
|
|
54
|
-
"isRangeDisabled"
|
|
55
|
-
]);
|
|
56
|
-
return /* @__PURE__ */ jsx(
|
|
57
|
-
"span",
|
|
58
|
-
__spreadProps(__spreadValues({}, props), {
|
|
59
|
-
className: clsx(
|
|
60
|
-
"flex items-center justify-center aspect-square select-none transition-colors border duration-100 font-medium",
|
|
61
|
-
typography.caption,
|
|
62
|
-
cellPadding,
|
|
63
|
-
!isToday && !isSelected && !inRange && !isDisabled && !isRangeStart && !isRangeEnd && "border-transparent",
|
|
64
|
-
!isInMonth && "border-transparent",
|
|
65
|
-
// Today: subtle border ring
|
|
66
|
-
isToday && !isSelected && !inRange && "rounded-full border-border-primary-normal ",
|
|
67
|
-
// Selected: Figma blue, white text, strong shadow
|
|
68
|
-
isSelected && "bg-action-400 text-white border-action-400 z-10",
|
|
69
|
-
!isSelected && !inRange && "rounded-base",
|
|
70
|
-
// When range is disabled OR when only 'from' is selected (no range yet), apply rounded corners
|
|
71
|
-
(isRangeDisabled || !inRange && isSelected) && "rounded-base",
|
|
72
|
-
inRange && isSelected && "hover:border-action-500",
|
|
73
|
-
// In range: Figma light blue background
|
|
74
|
-
inRange && !isSelected && "bg-action-100 text-text-primary-normal border-y-action-400 border-x-0 ",
|
|
75
|
-
// Disabled: Figma gray, no pointer, no hover
|
|
76
|
-
isDisabled && !inRange ? "text-text-primary-disabled bg-transparent pointer-events-none opacity-40 border-transparent" : [
|
|
77
|
-
"text-text-primary-normal cursor-pointer",
|
|
78
|
-
// Figma hover: blue bg, blue text (or red text if selected)
|
|
79
|
-
isSelected ? "hover:bg-background-action-primary-hover hover:text-white" : "hover:bg-action-100 hover:text-text-action-primary-hover",
|
|
80
|
-
// Figma active: darker blue bg, white text
|
|
81
|
-
"active:bg-action-300 active:text-white",
|
|
82
|
-
// Figma focus: ring
|
|
83
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-400"
|
|
84
|
-
],
|
|
85
|
-
isRangeStart && "rounded-l",
|
|
86
|
-
isRangeEnd && "rounded-r"
|
|
87
|
-
),
|
|
88
|
-
tabIndex: isDisabled ? -1 : 0,
|
|
89
|
-
"aria-disabled": isDisabled,
|
|
90
|
-
onClick: () => !isDisabled && isInMonth && onClick(),
|
|
91
|
-
onMouseEnter: () => isInMonth && onMouseEnter(),
|
|
92
|
-
onMouseLeave: () => isInMonth && onMouseLeave(),
|
|
93
|
-
children: isInMonth ? date.day : ""
|
|
94
|
-
})
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
function CalendarRange({
|
|
98
|
-
from,
|
|
99
|
-
to,
|
|
100
|
-
onChange,
|
|
101
|
-
isDateAvailable,
|
|
102
|
-
mode = "double",
|
|
103
|
-
cardStyle = false,
|
|
104
|
-
disableRange = false
|
|
105
|
-
}) {
|
|
106
|
-
const weekDays = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
107
|
-
const parseDate = (d) => {
|
|
108
|
-
if (!d) return void 0;
|
|
109
|
-
if (typeof d === "number")
|
|
110
|
-
return Temporal.PlainDate.from(new Date(d).toISOString().slice(0, 10));
|
|
111
|
-
if (typeof d === "string") return Temporal.PlainDate.from(d);
|
|
112
|
-
return void 0;
|
|
113
|
-
};
|
|
114
|
-
const fromDate = parseDate(from);
|
|
115
|
-
const toDate = parseDate(to);
|
|
116
|
-
const today = Temporal.Now.plainDateISO();
|
|
117
|
-
const [baseMonth, setBaseMonth] = useState(
|
|
118
|
-
fromDate != null ? fromDate : today.with({ day: 1 })
|
|
119
|
-
);
|
|
120
|
-
const [selecting, setSelecting] = useState("from");
|
|
121
|
-
const [pendingFrom, setPendingFrom] = useState(void 0);
|
|
122
|
-
const [hoveredDate, setHoveredDate] = useState(void 0);
|
|
123
|
-
function getMonthData(monthOffset) {
|
|
124
|
-
const monthDate = baseMonth.add({ months: monthOffset }).with({ day: 1 });
|
|
125
|
-
const days = monthDate.daysInMonth;
|
|
126
|
-
const firstDayOffset = monthDate.dayOfWeek % 7;
|
|
127
|
-
return {
|
|
128
|
-
name: monthDate.toLocaleString("en-US", { month: "long" }),
|
|
129
|
-
year: monthDate.year,
|
|
130
|
-
days,
|
|
131
|
-
firstDayOffset,
|
|
132
|
-
date: monthDate
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
function handleDayClick(date) {
|
|
136
|
-
if (isDateAvailable && !isDateAvailable(date)) return;
|
|
137
|
-
if (mode === "single" && disableRange) {
|
|
138
|
-
if (onChange) {
|
|
139
|
-
onChange(date.toString(), date.toString());
|
|
140
|
-
}
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (selecting === "from") {
|
|
144
|
-
setPendingFrom(date);
|
|
145
|
-
setSelecting("to");
|
|
146
|
-
setHoveredDate(void 0);
|
|
147
|
-
} else if (pendingFrom) {
|
|
148
|
-
if (onChange) {
|
|
149
|
-
const [start, end] = Temporal.PlainDate.compare(date, pendingFrom) < 0 ? [date, pendingFrom] : [pendingFrom, date];
|
|
150
|
-
onChange(start.toString(), end.toString());
|
|
151
|
-
}
|
|
152
|
-
setPendingFrom(void 0);
|
|
153
|
-
setSelecting("from");
|
|
154
|
-
setHoveredDate(void 0);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
function isInRange(date) {
|
|
158
|
-
if (mode === "single" && disableRange) {
|
|
159
|
-
return false;
|
|
160
|
-
}
|
|
161
|
-
if (pendingFrom && selecting === "to" && hoveredDate) {
|
|
162
|
-
const [start, end] = Temporal.PlainDate.compare(hoveredDate, pendingFrom) < 0 ? [hoveredDate, pendingFrom] : [pendingFrom, hoveredDate];
|
|
163
|
-
return Temporal.PlainDate.compare(date, start) >= 0 && Temporal.PlainDate.compare(date, end) <= 0;
|
|
164
|
-
}
|
|
165
|
-
if (!pendingFrom && fromDate && toDate) {
|
|
166
|
-
return Temporal.PlainDate.compare(date, fromDate) >= 0 && Temporal.PlainDate.compare(date, toDate) <= 0;
|
|
167
|
-
}
|
|
168
|
-
return false;
|
|
169
|
-
}
|
|
170
|
-
return /* @__PURE__ */ jsx(
|
|
171
|
-
"div",
|
|
172
|
-
{
|
|
173
|
-
className: clsx(
|
|
174
|
-
"relative bg-background-grouped-primary-normal rounded-base w-fit",
|
|
175
|
-
componentPadding,
|
|
176
|
-
componentGap,
|
|
177
|
-
cardStyle && "shadow-4",
|
|
178
|
-
// baseTransition,
|
|
179
|
-
"overflow-hidden"
|
|
180
|
-
),
|
|
181
|
-
children: /* @__PURE__ */ jsx(
|
|
182
|
-
"div",
|
|
183
|
-
{
|
|
184
|
-
className: clsx(
|
|
185
|
-
"flex flex-row items-start justify-start bg-background-primary-normal overflow-clip",
|
|
186
|
-
componentGap,
|
|
187
|
-
paddingUsingComponentGap
|
|
188
|
-
),
|
|
189
|
-
children: (mode === "double" ? [0, 1] : [0]).map((offset, idx) => {
|
|
190
|
-
const month = getMonthData(offset);
|
|
191
|
-
const totalCells = 42;
|
|
192
|
-
const emptyCells = month.firstDayOffset;
|
|
193
|
-
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
194
|
-
/* @__PURE__ */ jsxs(
|
|
195
|
-
"div",
|
|
196
|
-
{
|
|
197
|
-
className: clsx(
|
|
198
|
-
"flex flex-col",
|
|
199
|
-
componentGap,
|
|
200
|
-
componentPadding
|
|
201
|
-
),
|
|
202
|
-
children: [
|
|
203
|
-
/* @__PURE__ */ jsxs(
|
|
204
|
-
"div",
|
|
205
|
-
{
|
|
206
|
-
className: clsx(
|
|
207
|
-
"flex flex-row items-center justify-between",
|
|
208
|
-
componentGap,
|
|
209
|
-
componentPaddingXUsingComponentGap,
|
|
210
|
-
componentPaddingYUsingComponentGap,
|
|
211
|
-
"mb-3",
|
|
212
|
-
typography.label,
|
|
213
|
-
"text-text-action-primary-normal"
|
|
214
|
-
),
|
|
215
|
-
children: [
|
|
216
|
-
idx === 0 ? /* @__PURE__ */ jsx(
|
|
217
|
-
"button",
|
|
218
|
-
{
|
|
219
|
-
type: "button",
|
|
220
|
-
className: clsx(
|
|
221
|
-
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-primary-normal",
|
|
222
|
-
componentPadding,
|
|
223
|
-
"mr-1"
|
|
224
|
-
),
|
|
225
|
-
"aria-label": "Previous month",
|
|
226
|
-
onClick: () => setBaseMonth(baseMonth.subtract({ months: 1 })),
|
|
227
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "chevron_left", size: 24 })
|
|
228
|
-
}
|
|
229
|
-
) : /* @__PURE__ */ jsx("span", { className: clsx(componentPadding, "mr-1") }),
|
|
230
|
-
/* @__PURE__ */ jsxs("div", { className: "flex gap-desktop-compact-component-padding", children: [
|
|
231
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold text-text-action-primary-normal text-[14px] leading-[1] truncate", children: month.name }),
|
|
232
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold text-text-action-primary-normal text-[14px] leading-[1] px-1 truncate", children: month.year })
|
|
233
|
-
] }),
|
|
234
|
-
(mode === "double" ? idx === 1 : true) ? /* @__PURE__ */ jsx(
|
|
235
|
-
"button",
|
|
236
|
-
{
|
|
237
|
-
type: "button",
|
|
238
|
-
className: clsx(
|
|
239
|
-
"flex items-center justify-center rounded-base hover:bg-action-100 active:bg-action-300 text-icon-primary-normal",
|
|
240
|
-
componentPadding,
|
|
241
|
-
"ml-1"
|
|
242
|
-
),
|
|
243
|
-
"aria-label": "Next month",
|
|
244
|
-
onClick: () => setBaseMonth(baseMonth.add({ months: 1 })),
|
|
245
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "chevron_right", size: 24 })
|
|
246
|
-
}
|
|
247
|
-
) : /* @__PURE__ */ jsx("span", { className: clsx(componentPadding, "ml-1") })
|
|
248
|
-
]
|
|
249
|
-
}
|
|
250
|
-
),
|
|
251
|
-
/* @__PURE__ */ jsx("div", { className: clsx("grid grid-cols-7 mb-1", componentGap), children: weekDays.map((d) => /* @__PURE__ */ jsx(
|
|
252
|
-
"span",
|
|
253
|
-
{
|
|
254
|
-
className: clsx(
|
|
255
|
-
typography.caption,
|
|
256
|
-
"text-text-secondary-normal text-center"
|
|
257
|
-
),
|
|
258
|
-
children: d
|
|
259
|
-
},
|
|
260
|
-
d
|
|
261
|
-
)) }),
|
|
262
|
-
/* @__PURE__ */ jsx("div", { className: clsx("grid grid-cols-7"), children: Array.from({ length: totalCells }).map((_, i) => {
|
|
263
|
-
const day = i - emptyCells + 1;
|
|
264
|
-
const date = month.date.with({ day: 1 }).add({
|
|
265
|
-
days: i - emptyCells
|
|
266
|
-
});
|
|
267
|
-
const isInMonth = day > 0 && day <= month.days;
|
|
268
|
-
const isToday = isInMonth && date.equals(today);
|
|
269
|
-
const isSelected = isInMonth && (!pendingFrom && fromDate && date.equals(fromDate) || !pendingFrom && toDate && date.equals(toDate) || pendingFrom && date.equals(pendingFrom));
|
|
270
|
-
const inRange = isInMonth && isInRange(date);
|
|
271
|
-
const isDisabled = !isInMonth || (isDateAvailable ? !isDateAvailable(date) : false);
|
|
272
|
-
const hoverDateIsBeforePendingFrom = hoveredDate && pendingFrom && Temporal.PlainDate.compare(hoveredDate, pendingFrom) < 0;
|
|
273
|
-
const hoverDateIsAfterPendingFrom = hoveredDate && pendingFrom && Temporal.PlainDate.compare(hoveredDate, pendingFrom) >= 0;
|
|
274
|
-
const isRangeStart = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && fromDate && date.equals(fromDate) || hoverDateIsAfterPendingFrom && date.equals(pendingFrom);
|
|
275
|
-
const isRangeEnd = mode === "single" && disableRange ? false : !pendingFrom && isInMonth && toDate && date.equals(toDate) || hoverDateIsBeforePendingFrom && date.equals(pendingFrom);
|
|
276
|
-
return /* @__PURE__ */ jsx(
|
|
277
|
-
DateCell,
|
|
278
|
-
{
|
|
279
|
-
date,
|
|
280
|
-
isInMonth: !!isInMonth,
|
|
281
|
-
isToday: !!isToday,
|
|
282
|
-
isSelected: !!isSelected,
|
|
283
|
-
inRange: !!inRange,
|
|
284
|
-
isDisabled: !!isDisabled,
|
|
285
|
-
onClick: () => handleDayClick(date),
|
|
286
|
-
onMouseEnter: () => setHoveredDate(date),
|
|
287
|
-
onMouseLeave: () => setHoveredDate(void 0),
|
|
288
|
-
isRangeStart: !!isRangeStart,
|
|
289
|
-
isRangeEnd: !!isRangeEnd,
|
|
290
|
-
isRangeDisabled: mode === "single" && disableRange,
|
|
291
|
-
cellPadding: "p-1.5 md:p-2 lg:p-2.5"
|
|
292
|
-
},
|
|
293
|
-
i
|
|
294
|
-
);
|
|
295
|
-
}) })
|
|
296
|
-
]
|
|
297
|
-
}
|
|
298
|
-
),
|
|
299
|
-
mode === "double" && idx === 0 && /* @__PURE__ */ jsx(
|
|
300
|
-
"div",
|
|
301
|
-
{
|
|
302
|
-
className: clsx(
|
|
303
|
-
"self-stretch bg-border-primary-normal rounded-base mx-mobile-component-padding desktop:mx-desktop-component-padding compact:mx-desktop-compact-component-padding",
|
|
304
|
-
// 1px width, full height, matches Figma divider
|
|
305
|
-
"w-px"
|
|
306
|
-
)
|
|
307
|
-
}
|
|
308
|
-
)
|
|
309
|
-
] }, month.name + month.year);
|
|
310
|
-
})
|
|
311
|
-
}
|
|
312
|
-
)
|
|
313
|
-
}
|
|
314
|
-
);
|
|
315
|
-
}
|
|
316
|
-
var CalendarRange_default = CalendarRange;
|
|
317
|
-
|
|
318
|
-
export {
|
|
319
|
-
isWeekend,
|
|
320
|
-
CalendarRange,
|
|
321
|
-
CalendarRange_default
|
|
322
|
-
};
|