@keboola/design 10.1.0 → 11.0.0
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/AGENTS.md +2 -0
- package/dist/MermaidDiagram-ZU5KAVRT.js +18 -0
- package/dist/{MermaidDiagram-EOKJHQQV.js.map → MermaidDiagram-ZU5KAVRT.js.map} +1 -1
- package/dist/charts.d.ts +14 -8
- package/dist/charts.js +6 -1
- package/dist/charts.js.map +1 -1
- package/dist/chunk-2YYJDKSP.js +51 -0
- package/dist/chunk-2YYJDKSP.js.map +1 -0
- package/dist/chunk-3P5UUCFI.js +385 -0
- package/dist/chunk-3P5UUCFI.js.map +1 -0
- package/dist/chunk-3QDFDDWZ.js +99 -0
- package/dist/chunk-3QDFDDWZ.js.map +1 -0
- package/dist/chunk-3W27OLK5.js +15 -0
- package/dist/chunk-3W27OLK5.js.map +1 -0
- package/dist/chunk-4FIZZONW.js +40 -0
- package/dist/chunk-4FIZZONW.js.map +1 -0
- package/dist/chunk-4GIAXOJG.js +133 -0
- package/dist/chunk-4GIAXOJG.js.map +1 -0
- package/dist/chunk-52NDNMK7.js +99 -0
- package/dist/chunk-52NDNMK7.js.map +1 -0
- package/dist/chunk-576G5OES.js +201 -0
- package/dist/chunk-576G5OES.js.map +1 -0
- package/dist/chunk-5AIE6SET.js +659 -0
- package/dist/chunk-5AIE6SET.js.map +1 -0
- package/dist/chunk-5FTNAZRW.js +327 -0
- package/dist/chunk-5FTNAZRW.js.map +1 -0
- package/dist/chunk-5IG2S7ZY.js +70 -0
- package/dist/chunk-5IG2S7ZY.js.map +1 -0
- package/dist/chunk-5QCXHNCW.js +404 -0
- package/dist/chunk-5QCXHNCW.js.map +1 -0
- package/dist/chunk-6DUMGC7Y.js +105 -0
- package/dist/chunk-6DUMGC7Y.js.map +1 -0
- package/dist/chunk-6J25CVST.js +174 -0
- package/dist/chunk-6J25CVST.js.map +1 -0
- package/dist/chunk-6NN35XOP.js +120 -0
- package/dist/chunk-6NN35XOP.js.map +1 -0
- package/dist/chunk-6NZBVA4T.js +24 -0
- package/dist/chunk-6NZBVA4T.js.map +1 -0
- package/dist/chunk-6W5BHRCL.js +295 -0
- package/dist/chunk-6W5BHRCL.js.map +1 -0
- package/dist/chunk-72BKRCEG.js +409 -0
- package/dist/chunk-72BKRCEG.js.map +1 -0
- package/dist/{chunk-Q7NWXLCT.js → chunk-7GTI3PPI.js} +53 -48
- package/dist/chunk-7GTI3PPI.js.map +1 -0
- package/dist/chunk-7P6PLZ4B.js +74 -0
- package/dist/chunk-7P6PLZ4B.js.map +1 -0
- package/dist/chunk-7WZWY5IA.js +46 -0
- package/dist/chunk-7WZWY5IA.js.map +1 -0
- package/dist/chunk-AIYO2632.js +489 -0
- package/dist/chunk-AIYO2632.js.map +1 -0
- package/dist/chunk-ANFZWPNE.js +112 -0
- package/dist/chunk-ANFZWPNE.js.map +1 -0
- package/dist/chunk-ANZTVAJU.js +73 -0
- package/dist/chunk-ANZTVAJU.js.map +1 -0
- package/dist/chunk-BD5BTJKX.js +166 -0
- package/dist/chunk-BD5BTJKX.js.map +1 -0
- package/dist/chunk-BHGIDSRJ.js +140 -0
- package/dist/chunk-BHGIDSRJ.js.map +1 -0
- package/dist/chunk-BSQWZITZ.js +507 -0
- package/dist/chunk-BSQWZITZ.js.map +1 -0
- package/dist/chunk-D3LAIK62.js +23 -0
- package/dist/chunk-D3LAIK62.js.map +1 -0
- package/dist/chunk-DODCR43C.js +155 -0
- package/dist/chunk-DODCR43C.js.map +1 -0
- package/dist/chunk-EEK5NGZF.js +40 -0
- package/dist/chunk-EEK5NGZF.js.map +1 -0
- package/dist/chunk-ENRG7TXA.js +11 -0
- package/dist/chunk-ENRG7TXA.js.map +1 -0
- package/dist/chunk-EQRMGIGY.js +239 -0
- package/dist/chunk-EQRMGIGY.js.map +1 -0
- package/dist/{chunk-XV3UUOYF.js → chunk-ERAHK5YQ.js} +9 -359
- package/dist/chunk-ERAHK5YQ.js.map +1 -0
- package/dist/chunk-F3FOFY2P.js +124 -0
- package/dist/chunk-F3FOFY2P.js.map +1 -0
- package/dist/chunk-F6BTWFOC.js +507 -0
- package/dist/chunk-F6BTWFOC.js.map +1 -0
- package/dist/chunk-F6J6NNAL.js +34 -0
- package/dist/chunk-F6J6NNAL.js.map +1 -0
- package/dist/chunk-FCHJ7D5O.js +59 -0
- package/dist/chunk-FCHJ7D5O.js.map +1 -0
- package/dist/chunk-FFJTEQCC.js +80 -0
- package/dist/chunk-FFJTEQCC.js.map +1 -0
- package/dist/chunk-FUFMVW7O.js +64 -0
- package/dist/chunk-FUFMVW7O.js.map +1 -0
- package/dist/chunk-FVPGQ6UE.js +25 -0
- package/dist/chunk-FVPGQ6UE.js.map +1 -0
- package/dist/{chunk-JP7PNHLH.js → chunk-G3PMV62Z.js} +3 -10
- package/dist/chunk-G3PMV62Z.js.map +1 -0
- package/dist/chunk-GACFOW3E.js +51 -0
- package/dist/chunk-GACFOW3E.js.map +1 -0
- package/dist/chunk-GDT6HQMK.js +42 -0
- package/dist/chunk-GDT6HQMK.js.map +1 -0
- package/dist/chunk-HLGU22C6.js +2589 -0
- package/dist/chunk-HLGU22C6.js.map +1 -0
- package/dist/chunk-HPMYYGP7.js +134 -0
- package/dist/chunk-HPMYYGP7.js.map +1 -0
- package/dist/chunk-I2UCOD45.js +197 -0
- package/dist/chunk-I2UCOD45.js.map +1 -0
- package/dist/chunk-IEGDZUVM.js +75 -0
- package/dist/chunk-IEGDZUVM.js.map +1 -0
- package/dist/chunk-IIS7INHF.js +47 -0
- package/dist/chunk-IIS7INHF.js.map +1 -0
- package/dist/chunk-ITELSEFU.js +256 -0
- package/dist/chunk-ITELSEFU.js.map +1 -0
- package/dist/{chunk-CTCFYWJC.js → chunk-IXAYNBOY.js} +6 -6
- package/dist/{chunk-CTCFYWJC.js.map → chunk-IXAYNBOY.js.map} +1 -1
- package/dist/chunk-JUW2ETEI.js +191 -0
- package/dist/chunk-JUW2ETEI.js.map +1 -0
- package/dist/chunk-K65C7CVE.js +127 -0
- package/dist/chunk-K65C7CVE.js.map +1 -0
- package/dist/chunk-KDI64MCY.js +189 -0
- package/dist/chunk-KDI64MCY.js.map +1 -0
- package/dist/chunk-KN4ASMH5.js +160 -0
- package/dist/chunk-KN4ASMH5.js.map +1 -0
- package/dist/chunk-KQW7QNTU.js +1549 -0
- package/dist/chunk-KQW7QNTU.js.map +1 -0
- package/dist/chunk-KR7NXXHC.js +66 -0
- package/dist/chunk-KR7NXXHC.js.map +1 -0
- package/dist/chunk-KRZKIVMA.js +142 -0
- package/dist/chunk-KRZKIVMA.js.map +1 -0
- package/dist/{chunk-C3L3TBBT.js → chunk-KTTLLKGQ.js} +6 -63
- package/dist/chunk-KTTLLKGQ.js.map +1 -0
- package/dist/chunk-KWKSHPDP.js +234 -0
- package/dist/chunk-KWKSHPDP.js.map +1 -0
- package/dist/chunk-KZVC7OYG.js +57 -0
- package/dist/chunk-KZVC7OYG.js.map +1 -0
- package/dist/chunk-L5DHUN2V.js +204 -0
- package/dist/chunk-L5DHUN2V.js.map +1 -0
- package/dist/chunk-LCTGEH57.js +1376 -0
- package/dist/chunk-LCTGEH57.js.map +1 -0
- package/dist/chunk-LXLIQ2D6.js +12 -0
- package/dist/chunk-LXLIQ2D6.js.map +1 -0
- package/dist/chunk-M4CTURKX.js +84 -0
- package/dist/chunk-M4CTURKX.js.map +1 -0
- package/dist/chunk-M6LTUPVP.js +301 -0
- package/dist/chunk-M6LTUPVP.js.map +1 -0
- package/dist/chunk-MA6RRHDT.js +291 -0
- package/dist/chunk-MA6RRHDT.js.map +1 -0
- package/dist/chunk-MODE4QIA.js +6 -0
- package/dist/chunk-MODE4QIA.js.map +1 -0
- package/dist/chunk-MVILMVGG.js +118 -0
- package/dist/chunk-MVILMVGG.js.map +1 -0
- package/dist/chunk-MWS4VCLV.js +17 -0
- package/dist/chunk-MWS4VCLV.js.map +1 -0
- package/dist/chunk-NEUX74SO.js +315 -0
- package/dist/chunk-NEUX74SO.js.map +1 -0
- package/dist/chunk-NFHKYBRD.js +156 -0
- package/dist/chunk-NFHKYBRD.js.map +1 -0
- package/dist/chunk-NHJNNXD3.js +89 -0
- package/dist/chunk-NHJNNXD3.js.map +1 -0
- package/dist/chunk-O2BF3HZL.js +33 -0
- package/dist/chunk-O2BF3HZL.js.map +1 -0
- package/dist/chunk-OANXCZYD.js +212 -0
- package/dist/chunk-OANXCZYD.js.map +1 -0
- package/dist/chunk-ODJF7YIP.js +230 -0
- package/dist/chunk-ODJF7YIP.js.map +1 -0
- package/dist/chunk-ON4BJTHI.js +101 -0
- package/dist/chunk-ON4BJTHI.js.map +1 -0
- package/dist/{chunk-VMFSRV5H.js → chunk-OTL5WXIJ.js} +2 -2
- package/dist/{chunk-VMFSRV5H.js.map → chunk-OTL5WXIJ.js.map} +1 -1
- package/dist/{chunk-VPPM7UUQ.js → chunk-PACNBKJV.js} +3 -3
- package/dist/{chunk-VPPM7UUQ.js.map → chunk-PACNBKJV.js.map} +1 -1
- package/dist/{chunk-ESBL3IPF.js → chunk-PROCA7K7.js} +2 -2
- package/dist/{chunk-ESBL3IPF.js.map → chunk-PROCA7K7.js.map} +1 -1
- package/dist/chunk-QGMIPA67.js +85 -0
- package/dist/chunk-QGMIPA67.js.map +1 -0
- package/dist/chunk-QQA37LFB.js +190 -0
- package/dist/chunk-QQA37LFB.js.map +1 -0
- package/dist/chunk-QZAWRSEB.js +61 -0
- package/dist/chunk-QZAWRSEB.js.map +1 -0
- package/dist/chunk-R74KGWNS.js +699 -0
- package/dist/chunk-R74KGWNS.js.map +1 -0
- package/dist/chunk-RFDLHMKL.js +110 -0
- package/dist/chunk-RFDLHMKL.js.map +1 -0
- package/dist/chunk-RL64HN7S.js +40 -0
- package/dist/chunk-RL64HN7S.js.map +1 -0
- package/dist/chunk-RMRQKPL7.js +115 -0
- package/dist/chunk-RMRQKPL7.js.map +1 -0
- package/dist/{chunk-BOHNXTMM.js → chunk-RQVK4IYC.js} +3 -3
- package/dist/{chunk-BOHNXTMM.js.map → chunk-RQVK4IYC.js.map} +1 -1
- package/dist/chunk-RTW56PWZ.js +59 -0
- package/dist/chunk-RTW56PWZ.js.map +1 -0
- package/dist/chunk-RUTPQNLR.js +266 -0
- package/dist/chunk-RUTPQNLR.js.map +1 -0
- package/dist/chunk-S6TAF63G.js +25 -0
- package/dist/chunk-S6TAF63G.js.map +1 -0
- package/dist/chunk-SBGAUGXY.js +224 -0
- package/dist/chunk-SBGAUGXY.js.map +1 -0
- package/dist/chunk-SC275NHZ.js +407 -0
- package/dist/chunk-SC275NHZ.js.map +1 -0
- package/dist/chunk-SCQPU4UE.js +97 -0
- package/dist/chunk-SCQPU4UE.js.map +1 -0
- package/dist/chunk-SFFF2WQP.js +8 -0
- package/dist/chunk-SFFF2WQP.js.map +1 -0
- package/dist/chunk-SJYMHZKA.js +36 -0
- package/dist/chunk-SJYMHZKA.js.map +1 -0
- package/dist/chunk-SLCCUJVN.js +125 -0
- package/dist/chunk-SLCCUJVN.js.map +1 -0
- package/dist/{chunk-IJTHFNNJ.js → chunk-SVBSNSD4.js} +10 -12
- package/dist/chunk-SVBSNSD4.js.map +1 -0
- package/dist/chunk-SVPLTL35.js +62 -0
- package/dist/chunk-SVPLTL35.js.map +1 -0
- package/dist/{chunk-63NSN2VL.js → chunk-SWQFYNYG.js} +115 -51
- package/dist/chunk-SWQFYNYG.js.map +1 -0
- package/dist/chunk-THHB4EWS.js +72 -0
- package/dist/chunk-THHB4EWS.js.map +1 -0
- package/dist/chunk-TUCDD33E.js +246 -0
- package/dist/chunk-TUCDD33E.js.map +1 -0
- package/dist/chunk-TV4WAP2R.js +14 -0
- package/dist/chunk-TV4WAP2R.js.map +1 -0
- package/dist/chunk-U3A6YBTZ.js +134 -0
- package/dist/chunk-U3A6YBTZ.js.map +1 -0
- package/dist/chunk-UGT6DKWM.js +95 -0
- package/dist/chunk-UGT6DKWM.js.map +1 -0
- package/dist/chunk-VSERHUWD.js +212 -0
- package/dist/chunk-VSERHUWD.js.map +1 -0
- package/dist/chunk-VYG7BDXC.js +49 -0
- package/dist/chunk-VYG7BDXC.js.map +1 -0
- package/dist/chunk-WETKNYZX.js +52 -0
- package/dist/chunk-WETKNYZX.js.map +1 -0
- package/dist/chunk-WGG4AML3.js +216 -0
- package/dist/chunk-WGG4AML3.js.map +1 -0
- package/dist/chunk-WKAUEL6I.js +30 -0
- package/dist/chunk-WKAUEL6I.js.map +1 -0
- package/dist/chunk-WPOLA5CG.js +81 -0
- package/dist/chunk-WPOLA5CG.js.map +1 -0
- package/dist/chunk-WPVETCGJ.js +254 -0
- package/dist/chunk-WPVETCGJ.js.map +1 -0
- package/dist/chunk-WTSM3A7E.js +13 -0
- package/dist/chunk-WTSM3A7E.js.map +1 -0
- package/dist/chunk-WU3F2K3T.js +148 -0
- package/dist/chunk-WU3F2K3T.js.map +1 -0
- package/dist/chunk-WZZK2DTZ.js +39 -0
- package/dist/chunk-WZZK2DTZ.js.map +1 -0
- package/dist/chunk-X4IHLKRD.js +42 -0
- package/dist/chunk-X4IHLKRD.js.map +1 -0
- package/dist/chunk-XAHEXZJC.js +80 -0
- package/dist/chunk-XAHEXZJC.js.map +1 -0
- package/dist/chunk-XCYGJDUX.js +31 -0
- package/dist/chunk-XCYGJDUX.js.map +1 -0
- package/dist/chunk-Y4W3JORC.js +104 -0
- package/dist/chunk-Y4W3JORC.js.map +1 -0
- package/dist/{chunk-7PUUHEJQ.js → chunk-YFZJ3ZLG.js} +26 -42
- package/dist/chunk-YFZJ3ZLG.js.map +1 -0
- package/dist/{chunk-6FPEI4EM.js → chunk-YI3WLXEN.js} +27 -2323
- package/dist/chunk-YI3WLXEN.js.map +1 -0
- package/dist/chunk-ZBKFSPD3.js +29 -0
- package/dist/chunk-ZBKFSPD3.js.map +1 -0
- package/dist/chunk-ZOERRQ6A.js +79 -0
- package/dist/chunk-ZOERRQ6A.js.map +1 -0
- package/dist/chunk-ZSTGUKHU.js +10 -0
- package/dist/chunk-ZSTGUKHU.js.map +1 -0
- package/dist/chunk-ZUEHDL27.js +65 -0
- package/dist/chunk-ZUEHDL27.js.map +1 -0
- package/dist/editors.js +22 -14
- package/dist/editors.js.map +1 -1
- package/dist/icons.js +7 -2
- package/dist/index.d.ts +8 -18
- package/dist/index.js +121 -15800
- package/dist/index.js.map +1 -1
- package/dist/internal/blocks/AIKit.js +30 -0
- package/dist/internal/blocks/AIKit.js.map +1 -0
- package/dist/internal/blocks/AppShell.js +11 -0
- package/dist/internal/blocks/AppShell.js.map +1 -0
- package/dist/internal/blocks/AutoSaveTextarea.js +14 -0
- package/dist/internal/blocks/AutoSaveTextarea.js.map +1 -0
- package/dist/internal/blocks/BrandEditor.js +23 -0
- package/dist/internal/blocks/BrandEditor.js.map +1 -0
- package/dist/internal/blocks/ChartPanel.js +10 -0
- package/dist/internal/blocks/ChartPanel.js.map +1 -0
- package/dist/internal/blocks/ClipboardButton.js +12 -0
- package/dist/internal/blocks/ClipboardButton.js.map +1 -0
- package/dist/internal/blocks/ColorInput.js +13 -0
- package/dist/internal/blocks/ColorInput.js.map +1 -0
- package/dist/internal/blocks/ColorModeSwitch.js +13 -0
- package/dist/internal/blocks/ColorModeSwitch.js.map +1 -0
- package/dist/internal/blocks/Command.js +15 -0
- package/dist/internal/blocks/Command.js.map +1 -0
- package/dist/internal/blocks/CopyField.js +11 -0
- package/dist/internal/blocks/CopyField.js.map +1 -0
- package/dist/internal/blocks/DashboardHero.js +9 -0
- package/dist/internal/blocks/DashboardHero.js.map +1 -0
- package/dist/internal/blocks/DateInput.js +16 -0
- package/dist/internal/blocks/DateInput.js.map +1 -0
- package/dist/internal/blocks/DateRangeInput.js +16 -0
- package/dist/internal/blocks/DateRangeInput.js.map +1 -0
- package/dist/internal/blocks/EmptyConfigurationActionCard.js +10 -0
- package/dist/internal/blocks/EmptyConfigurationActionCard.js.map +1 -0
- package/dist/internal/blocks/EmptyState.js +4 -0
- package/dist/internal/blocks/EmptyState.js.map +1 -0
- package/dist/internal/blocks/ErrorState.js +5 -0
- package/dist/internal/blocks/ErrorState.js.map +1 -0
- package/dist/internal/blocks/ExportMenu.js +13 -0
- package/dist/internal/blocks/ExportMenu.js.map +1 -0
- package/dist/internal/blocks/Form.js +29 -0
- package/dist/internal/blocks/Form.js.map +1 -0
- package/dist/internal/blocks/FormGroup.js +18 -0
- package/dist/internal/blocks/FormGroup.js.map +1 -0
- package/dist/internal/blocks/GoogleButton.js +10 -0
- package/dist/internal/blocks/GoogleButton.js.map +1 -0
- package/dist/internal/blocks/MicrosoftButton.js +10 -0
- package/dist/internal/blocks/MicrosoftButton.js.map +1 -0
- package/dist/internal/blocks/MultiActionButtonGroup.js +12 -0
- package/dist/internal/blocks/MultiActionButtonGroup.js.map +1 -0
- package/dist/internal/blocks/MultiCombobox.js +14 -0
- package/dist/internal/blocks/MultiCombobox.js.map +1 -0
- package/dist/internal/blocks/NumberInput.js +12 -0
- package/dist/internal/blocks/NumberInput.js.map +1 -0
- package/dist/internal/blocks/OtpInput.js +10 -0
- package/dist/internal/blocks/OtpInput.js.map +1 -0
- package/dist/internal/blocks/PageHeader.js +9 -0
- package/dist/internal/blocks/PageHeader.js.map +1 -0
- package/dist/internal/blocks/PageLayout.js +9 -0
- package/dist/internal/blocks/PageLayout.js.map +1 -0
- package/dist/internal/blocks/PageToolbar.js +13 -0
- package/dist/internal/blocks/PageToolbar.js.map +1 -0
- package/dist/internal/blocks/PasswordInput.js +13 -0
- package/dist/internal/blocks/PasswordInput.js.map +1 -0
- package/dist/internal/blocks/SearchInput.js +12 -0
- package/dist/internal/blocks/SearchInput.js.map +1 -0
- package/dist/internal/blocks/SearchInputWithNavigation.js +16 -0
- package/dist/internal/blocks/SearchInputWithNavigation.js.map +1 -0
- package/dist/internal/blocks/SectionNav.js +15 -0
- package/dist/internal/blocks/SectionNav.js.map +1 -0
- package/dist/internal/blocks/SplitButton.js +14 -0
- package/dist/internal/blocks/SplitButton.js.map +1 -0
- package/dist/internal/blocks/StatCard.js +10 -0
- package/dist/internal/blocks/StatCard.js.map +1 -0
- package/dist/internal/blocks/TextInput.js +13 -0
- package/dist/internal/blocks/TextInput.js.map +1 -0
- package/dist/internal/blocks/Textarea.js +13 -0
- package/dist/internal/blocks/Textarea.js.map +1 -0
- package/dist/internal/blocks/TimeInput.js +17 -0
- package/dist/internal/blocks/TimeInput.js.map +1 -0
- package/dist/internal/components/Alert.js +11 -0
- package/dist/internal/components/Alert.js.map +1 -0
- package/dist/internal/components/AlertModal.js +11 -0
- package/dist/internal/components/AlertModal.js.map +1 -0
- package/dist/internal/components/Avatar.js +9 -0
- package/dist/internal/components/Avatar.js.map +1 -0
- package/dist/internal/components/Badge.js +9 -0
- package/dist/internal/components/Badge.js.map +1 -0
- package/dist/internal/components/BrandLogo.js +11 -0
- package/dist/internal/components/BrandLogo.js.map +1 -0
- package/dist/internal/components/Breadcrumb.js +14 -0
- package/dist/internal/components/Breadcrumb.js.map +1 -0
- package/dist/internal/components/Button.js +10 -0
- package/dist/internal/components/Button.js.map +1 -0
- package/dist/internal/components/ButtonGroup.js +9 -0
- package/dist/internal/components/ButtonGroup.js.map +1 -0
- package/dist/internal/components/Calendar.js +9 -0
- package/dist/internal/components/Calendar.js.map +1 -0
- package/dist/internal/components/Card.js +9 -0
- package/dist/internal/components/Card.js.map +1 -0
- package/dist/internal/components/Checkbox.js +11 -0
- package/dist/internal/components/Checkbox.js.map +1 -0
- package/dist/internal/components/Clipboard.js +9 -0
- package/dist/internal/components/Clipboard.js.map +1 -0
- package/dist/internal/components/Collapsible.js +9 -0
- package/dist/internal/components/Collapsible.js.map +1 -0
- package/dist/internal/components/CollapsiblePanel.js +11 -0
- package/dist/internal/components/CollapsiblePanel.js.map +1 -0
- package/dist/internal/components/Combobox.js +13 -0
- package/dist/internal/components/Combobox.js.map +1 -0
- package/dist/internal/components/DatePicker.js +11 -0
- package/dist/internal/components/DatePicker.js.map +1 -0
- package/dist/internal/components/DateRangePicker.js +17 -0
- package/dist/internal/components/DateRangePicker.js.map +1 -0
- package/dist/internal/components/DiffView.js +9 -0
- package/dist/internal/components/DiffView.js.map +1 -0
- package/dist/internal/components/DotsLoader.js +5 -0
- package/dist/internal/components/DotsLoader.js.map +1 -0
- package/dist/internal/components/DropdownMenu.js +11 -0
- package/dist/internal/components/DropdownMenu.js.map +1 -0
- package/dist/internal/components/EmptySearchContent.js +4 -0
- package/dist/internal/components/EmptySearchContent.js.map +1 -0
- package/dist/internal/components/FileUpload.js +11 -0
- package/dist/internal/components/FileUpload.js.map +1 -0
- package/dist/internal/components/FullScreenModal.js +12 -0
- package/dist/internal/components/FullScreenModal.js.map +1 -0
- package/dist/internal/components/HelpBlock.js +4 -0
- package/dist/internal/components/HelpBlock.js.map +1 -0
- package/dist/internal/components/HoverCard.js +9 -0
- package/dist/internal/components/HoverCard.js.map +1 -0
- package/dist/internal/components/InputGroup.js +11 -0
- package/dist/internal/components/InputGroup.js.map +1 -0
- package/dist/internal/components/Kbd.js +9 -0
- package/dist/internal/components/Kbd.js.map +1 -0
- package/dist/internal/components/Label.js +9 -0
- package/dist/internal/components/Label.js.map +1 -0
- package/dist/internal/components/Link.js +9 -0
- package/dist/internal/components/Link.js.map +1 -0
- package/dist/internal/components/MarkedText.js +5 -0
- package/dist/internal/components/MarkedText.js.map +1 -0
- package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +10 -0
- package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js.map +1 -0
- package/dist/internal/components/MergeEditor/PaneHeader.js +4 -0
- package/dist/internal/components/MergeEditor/PaneHeader.js.map +1 -0
- package/dist/internal/components/MergeEditor/constants.js +4 -0
- package/dist/internal/components/MergeEditor/constants.js.map +1 -0
- package/dist/internal/components/MergeEditor/useMergeDiff.js +5 -0
- package/dist/internal/components/MergeEditor/useMergeDiff.js.map +1 -0
- package/dist/internal/components/Modal.js +13 -0
- package/dist/internal/components/Modal.js.map +1 -0
- package/dist/internal/components/Navbar.js +14 -0
- package/dist/internal/components/Navbar.js.map +1 -0
- package/dist/internal/components/Pagination.js +11 -0
- package/dist/internal/components/Pagination.js.map +1 -0
- package/dist/internal/components/PanelWithDetails.js +11 -0
- package/dist/internal/components/PanelWithDetails.js.map +1 -0
- package/dist/internal/components/Popconfirm.js +12 -0
- package/dist/internal/components/Popconfirm.js.map +1 -0
- package/dist/internal/components/Popover.js +9 -0
- package/dist/internal/components/Popover.js.map +1 -0
- package/dist/internal/components/Progress.js +9 -0
- package/dist/internal/components/Progress.js.map +1 -0
- package/dist/internal/components/RadioGroup.js +12 -0
- package/dist/internal/components/RadioGroup.js.map +1 -0
- package/dist/internal/components/Resizable.js +9 -0
- package/dist/internal/components/Resizable.js.map +1 -0
- package/dist/internal/components/ScrollArea.js +9 -0
- package/dist/internal/components/ScrollArea.js.map +1 -0
- package/dist/internal/components/Search.js +10 -0
- package/dist/internal/components/Search.js.map +1 -0
- package/dist/internal/components/Select.js +12 -0
- package/dist/internal/components/Select.js.map +1 -0
- package/dist/internal/components/Separator.js +9 -0
- package/dist/internal/components/Separator.js.map +1 -0
- package/dist/internal/components/Sheet.js +12 -0
- package/dist/internal/components/Sheet.js.map +1 -0
- package/dist/internal/components/Sidebar.js +20 -0
- package/dist/internal/components/Sidebar.js.map +1 -0
- package/dist/internal/components/Skeleton/Skeleton.js +9 -0
- package/dist/internal/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/internal/components/Skeleton/SkeletonList.js +10 -0
- package/dist/internal/components/Skeleton/SkeletonList.js.map +1 -0
- package/dist/internal/components/Slider.js +11 -0
- package/dist/internal/components/Slider.js.map +1 -0
- package/dist/internal/components/SpotlightBackdrop.js +9 -0
- package/dist/internal/components/SpotlightBackdrop.js.map +1 -0
- package/dist/internal/components/Stepper.js +10 -0
- package/dist/internal/components/Stepper.js.map +1 -0
- package/dist/internal/components/Switch.js +10 -0
- package/dist/internal/components/Switch.js.map +1 -0
- package/dist/internal/components/Table.js +10 -0
- package/dist/internal/components/Table.js.map +1 -0
- package/dist/internal/components/Tabs.js +12 -0
- package/dist/internal/components/Tabs.js.map +1 -0
- package/dist/internal/components/ThemeProvider.js +10 -0
- package/dist/internal/components/ThemeProvider.js.map +1 -0
- package/dist/internal/components/TimePicker.js +12 -0
- package/dist/internal/components/TimePicker.js.map +1 -0
- package/dist/internal/components/Timeline.js +10 -0
- package/dist/internal/components/Timeline.js.map +1 -0
- package/dist/internal/components/Toast.js +11 -0
- package/dist/internal/components/Toast.js.map +1 -0
- package/dist/internal/components/Toggle.js +9 -0
- package/dist/internal/components/Toggle.js.map +1 -0
- package/dist/internal/components/ToggleGroup.js +9 -0
- package/dist/internal/components/ToggleGroup.js.map +1 -0
- package/dist/internal/components/Tooltip.js +8 -0
- package/dist/internal/components/Tooltip.js.map +1 -0
- package/dist/internal/components/Truncated.js +9 -0
- package/dist/internal/components/Truncated.js.map +1 -0
- package/dist/internal/components/Workbench.js +11 -0
- package/dist/internal/components/Workbench.js.map +1 -0
- package/dist/internal/components/ZoomableSvg.js +13 -0
- package/dist/internal/components/ZoomableSvg.js.map +1 -0
- package/dist/internal/hooks/useAutosizeInput.js +4 -0
- package/dist/internal/hooks/useAutosizeInput.js.map +1 -0
- package/dist/internal/hooks/useScrollbarPosition.js +5 -0
- package/dist/internal/hooks/useScrollbarPosition.js.map +1 -0
- package/dist/internal/hooks/useStableCallback.js +4 -0
- package/dist/internal/hooks/useStableCallback.js.map +1 -0
- package/dist/internal/utils/mergeRefs.js +4 -0
- package/dist/internal/utils/mergeRefs.js.map +1 -0
- package/dist/internal/utils.js +8 -0
- package/dist/internal/utils.js.map +1 -0
- package/dist/markdown-editor.js +23 -9
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mermaid.js +16 -8
- package/dist/rjsf.js +102 -29
- package/dist/rjsf.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/testing.js +8 -3
- package/dist/testing.js.map +1 -1
- package/package.json +9 -8
- package/src/styles.css +35 -7
- package/src/theme.css +64 -0
- package/dist/MermaidDiagram-EOKJHQQV.js +0 -10
- package/dist/chunk-63NSN2VL.js.map +0 -1
- package/dist/chunk-6FPEI4EM.js.map +0 -1
- package/dist/chunk-7PUUHEJQ.js.map +0 -1
- package/dist/chunk-C3L3TBBT.js.map +0 -1
- package/dist/chunk-IJTHFNNJ.js.map +0 -1
- package/dist/chunk-JP7PNHLH.js.map +0 -1
- package/dist/chunk-KPNAW5MU.js +0 -229
- package/dist/chunk-KPNAW5MU.js.map +0 -1
- package/dist/chunk-L37JJ6MR.js +0 -152
- package/dist/chunk-L37JJ6MR.js.map +0 -1
- package/dist/chunk-Q7NWXLCT.js.map +0 -1
- package/dist/chunk-SYIEF644.js +0 -1016
- package/dist/chunk-SYIEF644.js.map +0 -1
- package/dist/chunk-XV3UUOYF.js.map +0 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { DatePicker } from './chunk-XCYGJDUX.js';
|
|
2
|
+
import { useControllableState } from './chunk-WKAUEL6I.js';
|
|
3
|
+
import { InputGroup } from './chunk-SC275NHZ.js';
|
|
4
|
+
import { X, Calendar } from './chunk-RQVK4IYC.js';
|
|
5
|
+
import { createChangeInputEvent } from './chunk-SWQFYNYG.js';
|
|
6
|
+
import { mergeRefs } from './chunk-3W27OLK5.js';
|
|
7
|
+
import { useRef, useState } from 'react';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
// src/blocks/DateRangeInput/helpers.ts
|
|
11
|
+
var formatDateRange = (range, inputValue) => {
|
|
12
|
+
if (!range) {
|
|
13
|
+
return inputValue;
|
|
14
|
+
}
|
|
15
|
+
const { from, to } = range;
|
|
16
|
+
const fromStr = from?.toLocaleDateString();
|
|
17
|
+
const toStr = to?.toLocaleDateString();
|
|
18
|
+
return `${fromStr} - ${toStr}`;
|
|
19
|
+
};
|
|
20
|
+
var ISO_DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/;
|
|
21
|
+
var parseLocalDate = (value) => ISO_DATE_ONLY.test(value) ? /* @__PURE__ */ new Date(`${value}T00:00:00`) : new Date(value);
|
|
22
|
+
var parseDateRange = (value) => {
|
|
23
|
+
const parts = value.split(" - ");
|
|
24
|
+
if (parts.length !== 2) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const [fromPart, toPart] = parts;
|
|
28
|
+
if (!fromPart || !toPart) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const from = parseLocalDate(fromPart.trim());
|
|
32
|
+
const to = parseLocalDate(toPart.trim());
|
|
33
|
+
if (isNaN(from.getTime()) || isNaN(to.getTime())) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return { from, to };
|
|
37
|
+
};
|
|
38
|
+
var DateRangeInput = ({
|
|
39
|
+
ref,
|
|
40
|
+
// group props
|
|
41
|
+
state,
|
|
42
|
+
variant,
|
|
43
|
+
focusVariant,
|
|
44
|
+
sizing,
|
|
45
|
+
className,
|
|
46
|
+
// own props
|
|
47
|
+
value: valueProp,
|
|
48
|
+
defaultValue,
|
|
49
|
+
onValueChange,
|
|
50
|
+
onValueBlur,
|
|
51
|
+
onChange,
|
|
52
|
+
onBlur,
|
|
53
|
+
onFocus,
|
|
54
|
+
allowClear = false,
|
|
55
|
+
startMonth,
|
|
56
|
+
endMonth,
|
|
57
|
+
// input props
|
|
58
|
+
disabled,
|
|
59
|
+
readOnly,
|
|
60
|
+
placeholder = "Select a date range",
|
|
61
|
+
...restInputProps
|
|
62
|
+
}) => {
|
|
63
|
+
const inputRef = useRef(null);
|
|
64
|
+
const [inputValue, setInputValue] = useState("");
|
|
65
|
+
const [hasFocus, setHasFocus] = useState(false);
|
|
66
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
67
|
+
const [month, setMonth] = useState(/* @__PURE__ */ new Date());
|
|
68
|
+
const [currentValue, setCurrentValue] = useControllableState({
|
|
69
|
+
prop: valueProp,
|
|
70
|
+
defaultProp: defaultValue ?? null
|
|
71
|
+
});
|
|
72
|
+
const canClear = allowClear && !!currentValue && !disabled && !readOnly;
|
|
73
|
+
const showPicker = !disabled && !readOnly;
|
|
74
|
+
const handleChange = (event) => {
|
|
75
|
+
const newValue = event.target.value;
|
|
76
|
+
setInputValue(newValue);
|
|
77
|
+
onChange?.(event);
|
|
78
|
+
const parsedRange = parseDateRange(newValue);
|
|
79
|
+
if (parsedRange !== null || !newValue.trim()) {
|
|
80
|
+
onValueChange?.(parsedRange);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const handleFocus = (event) => {
|
|
84
|
+
setInputValue(formatDateRange(currentValue, ""));
|
|
85
|
+
setHasFocus(true);
|
|
86
|
+
onFocus?.(event);
|
|
87
|
+
};
|
|
88
|
+
const handleBlur = (event) => {
|
|
89
|
+
setHasFocus(false);
|
|
90
|
+
onBlur?.(event);
|
|
91
|
+
const text = event.target.value;
|
|
92
|
+
const parsedRange = text === formatDateRange(currentValue, "") ? currentValue : parseDateRange(text);
|
|
93
|
+
onValueBlur?.(parsedRange);
|
|
94
|
+
setCurrentValue(parsedRange);
|
|
95
|
+
};
|
|
96
|
+
const handleDatePickerChange = (newValue) => {
|
|
97
|
+
const rangeValue = newValue ?? null;
|
|
98
|
+
setCurrentValue(rangeValue);
|
|
99
|
+
onValueChange?.(rangeValue);
|
|
100
|
+
setHasFocus(false);
|
|
101
|
+
};
|
|
102
|
+
const handleClear = () => {
|
|
103
|
+
if (!inputRef.current) return;
|
|
104
|
+
inputRef.current.value = "";
|
|
105
|
+
setInputValue("");
|
|
106
|
+
setCurrentValue(null);
|
|
107
|
+
onValueChange?.(null);
|
|
108
|
+
onChange?.(createChangeInputEvent(inputRef.current));
|
|
109
|
+
};
|
|
110
|
+
const handleOpenChange = (open) => {
|
|
111
|
+
if (open) {
|
|
112
|
+
setMonth(currentValue?.from ?? /* @__PURE__ */ new Date());
|
|
113
|
+
}
|
|
114
|
+
setIsOpen(open);
|
|
115
|
+
};
|
|
116
|
+
const displayValue = hasFocus ? inputValue : formatDateRange(currentValue, "");
|
|
117
|
+
return /* @__PURE__ */ jsxs(
|
|
118
|
+
InputGroup,
|
|
119
|
+
{
|
|
120
|
+
state,
|
|
121
|
+
variant,
|
|
122
|
+
sizing,
|
|
123
|
+
focusVariant,
|
|
124
|
+
className,
|
|
125
|
+
children: [
|
|
126
|
+
/* @__PURE__ */ jsx(
|
|
127
|
+
InputGroup.Input,
|
|
128
|
+
{
|
|
129
|
+
...restInputProps,
|
|
130
|
+
ref: mergeRefs(ref ?? null, inputRef),
|
|
131
|
+
type: "text",
|
|
132
|
+
value: displayValue,
|
|
133
|
+
placeholder,
|
|
134
|
+
onChange: handleChange,
|
|
135
|
+
onFocus: handleFocus,
|
|
136
|
+
onBlur: handleBlur,
|
|
137
|
+
disabled,
|
|
138
|
+
readOnly
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
(canClear || showPicker) && /* @__PURE__ */ jsxs(InputGroup.Addon, { align: "inline-end", children: [
|
|
142
|
+
canClear && /* @__PURE__ */ jsx(
|
|
143
|
+
InputGroup.Button,
|
|
144
|
+
{
|
|
145
|
+
"aria-label": "Clear date range",
|
|
146
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
147
|
+
onClick: handleClear,
|
|
148
|
+
children: /* @__PURE__ */ jsx(X, { className: "tw:size-4" })
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
showPicker && /* @__PURE__ */ jsx(
|
|
152
|
+
DatePicker,
|
|
153
|
+
{
|
|
154
|
+
endMonth,
|
|
155
|
+
mode: "range",
|
|
156
|
+
month,
|
|
157
|
+
onMonthChange: setMonth,
|
|
158
|
+
onOpenChange: handleOpenChange,
|
|
159
|
+
onSelect: handleDatePickerChange,
|
|
160
|
+
open: isOpen,
|
|
161
|
+
startMonth,
|
|
162
|
+
selected: currentValue ?? void 0,
|
|
163
|
+
children: /* @__PURE__ */ jsx(InputGroup.Button, { "aria-label": "Select date range", children: /* @__PURE__ */ jsx(Calendar, { className: "tw:size-4" }) })
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
] })
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export { DateRangeInput };
|
|
173
|
+
//# sourceMappingURL=chunk-6J25CVST.js.map
|
|
174
|
+
//# sourceMappingURL=chunk-6J25CVST.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/blocks/DateRangeInput/helpers.ts","../src/blocks/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":";;;;;;;;;;AAEO,IAAM,eAAA,GAAkB,CAC7B,KAAA,EACA,UAAA,KACW;AACX,EAAA,IAAI,CAAC,KAAA,EAAO;AACV,IAAA,OAAO,UAAA;AAAA,EACT;AAEA,EAAA,MAAM,EAAE,IAAA,EAAM,EAAA,EAAG,GAAI,KAAA;AACrB,EAAA,MAAM,OAAA,GAAU,MAAM,kBAAA,EAAmB;AACzC,EAAA,MAAM,KAAA,GAAQ,IAAI,kBAAA,EAAmB;AACrC,EAAA,OAAO,CAAA,EAAG,OAAO,CAAA,GAAA,EAAM,KAAK,CAAA,CAAA;AAC9B,CAAA;AAEA,IAAM,aAAA,GAAgB,qBAAA;AAatB,IAAM,cAAA,GAAiB,CAAC,KAAA,KACtB,aAAA,CAAc,KAAK,KAAK,CAAA,mBAAI,IAAI,IAAA,CAAK,GAAG,KAAK,CAAA,SAAA,CAAW,CAAA,GAAI,IAAI,KAAK,KAAK,CAAA;AAErE,IAAM,cAAA,GAAiB,CAAC,KAAA,KAAoC;AACjE,EAAA,MAAM,KAAA,GAAQ,KAAA,CAAM,KAAA,CAAM,KAAK,CAAA;AAC/B,EAAA,IAAI,KAAA,CAAM,WAAW,CAAA,EAAG;AACtB,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,CAAC,QAAA,EAAU,MAAM,CAAA,GAAI,KAAA;AAC3B,EAAA,IAAI,CAAC,QAAA,IAAY,CAAC,MAAA,EAAQ;AACxB,IAAA,OAAO,IAAA;AAAA,EACT;AAE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AA,YACT,MAAA,EAAQ,UAAA;AAAA,YACR,QAAA;AAAA,YACA;AAAA;AAAA,SACF;AAAA,QAAA,CAEE,YAAY,UAAA,qBACZ,IAAA,CAAC,WAAW,KAAA,EAAX,EAAiB,OAAM,YAAA,EACrB,QAAA,EAAA;AAAA,UAAA,QAAA,oBACC,GAAA;AAAA,YAAC,UAAA,CAAW,MAAA;AAAA,YAAX;AAAA,cACC,YAAA,EAAW,kBAAA;AAAA,cACX,WAAA,EAAa,CAAC,KAAA,KAAU,KAAA,CAAM,cAAA,EAAe;AAAA,cAC7C,OAAA,EAAS,WAAA;AAAA,cAET,QAAA,kBAAA,GAAA,CAAC,CAAA,EAAA,EAAE,SAAA,EAAU,WAAA,EAAY;AAAA;AAAA,WAC3B;AAAA,UAED,UAAA,oBACC,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,QAAA;AAAA,cACA,IAAA,EAAK,OAAA;AAAA,cACL,KAAA;AAAA,cACA,aAAA,EAAe,QAAA;AAAA,cACf,YAAA,EAAc,gBAAA;AAAA,cACd,QAAA,EAAU,sBAAA;AAAA,cACV,IAAA,EAAM,MAAA;AAAA,cACN,UAAA;AAAA,cACA,UAAU,YAAA,IAAgB,MAAA;AAAA,cAE1B,QAAA,kBAAA,GAAA,CAAC,UAAA,CAAW,MAAA,EAAX,EAAkB,YAAA,EAAW,qBAC5B,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAa,SAAA,EAAU,WAAA,EAAY,CAAA,EACtC;AAAA;AAAA;AACF,SAAA,EAEJ;AAAA;AAAA;AAAA,GAEJ;AAEJ","file":"chunk-6J25CVST.js","sourcesContent":["import type { DateRange } from 'react-day-picker';\n\nexport const formatDateRange = (\n range: DateRange | null | undefined,\n inputValue: string,\n): string => {\n if (!range) {\n return inputValue;\n }\n\n const { from, to } = range;\n const fromStr = from?.toLocaleDateString();\n const toStr = to?.toLocaleDateString();\n return `${fromStr} - ${toStr}`;\n};\n\nconst ISO_DATE_ONLY = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n/**\n * `new Date('2024-01-15')` is spec'd as UTC midnight, so reading it back with the\n * local getters this component relies on (`getDate`, `toLocaleDateString`) yields\n * the previous day for users west of UTC. Appending a time makes the ISO form\n * parse as local time instead, while keeping `new Date`'s validation — an\n * out-of-range month or day is still `Invalid Date`, whereas building the parts\n * via `new Date(y, m - 1, d)` would silently roll '2024-13-45' over to 2025-02-14.\n *\n * Every other format accepted here ('01/15/2024', 'Jan 15, 2024', '2024/01/15')\n * is already parsed as local time, so only the date-only ISO form is rewritten.\n */\nconst parseLocalDate = (value: string): Date =>\n ISO_DATE_ONLY.test(value) ? new Date(`${value}T00:00:00`) : new Date(value);\n\nexport const parseDateRange = (value: string): DateRange | null => {\n const parts = value.split(' - ');\n if (parts.length !== 2) {\n return null;\n }\n\n const [fromPart, toPart] = parts;\n if (!fromPart || !toPart) {\n return null;\n }\n\n const from = parseLocalDate(fromPart.trim());\n const to = parseLocalDate(toPart.trim());\n\n if (isNaN(from.getTime()) || isNaN(to.getTime())) {\n return null;\n }\n\n return { from, to };\n};\n","import { useRef, useState } from 'react';\nimport type { ChangeEventHandler, ComponentProps, ComponentRef, FocusEventHandler } from 'react';\nimport type { DateRange } from 'react-day-picker';\n\nimport { DatePicker } from '../../components/DatePicker';\nimport { InputGroup } from '../../components/InputGroup';\nimport { useControllableState } from '../../hooks/useControllableState';\nimport { Calendar as CalendarIcon, X } from '../../icons';\nimport { createChangeInputEvent, mergeRefs } from '../../utils';\n\nimport { formatDateRange, parseDateRange } from './helpers';\n\ntype InputGroupProps = Pick<\n ComponentProps<typeof InputGroup>,\n 'variant' | 'focusVariant' | 'state' | 'sizing'\n>;\n\ntype InputGroupInputProps = Omit<\n ComponentProps<typeof InputGroup.Input>,\n 'value' | 'defaultValue' | 'type'\n>;\n\ntype Props = InputGroupProps &\n InputGroupInputProps & {\n value?: DateRange | null;\n defaultValue?: DateRange | null;\n onValueChange?: (value: DateRange | null) => void;\n onValueBlur?: (value: DateRange | null) => void;\n allowClear?: boolean;\n startMonth?: Date;\n endMonth?: Date;\n };\n\nexport const DateRangeInput = ({\n ref,\n\n // group props\n state,\n variant,\n focusVariant,\n sizing,\n className,\n\n // own props\n value: valueProp,\n defaultValue,\n onValueChange,\n onValueBlur,\n onChange,\n onBlur,\n onFocus,\n allowClear = false,\n startMonth,\n endMonth,\n\n // input props\n disabled,\n readOnly,\n placeholder = 'Select a date range',\n ...restInputProps\n}: Props) => {\n const inputRef = useRef<ComponentRef<'input'>>(null);\n\n const [inputValue, setInputValue] = useState('');\n const [hasFocus, setHasFocus] = useState(false);\n const [isOpen, setIsOpen] = useState(false);\n const [month, setMonth] = useState<Date>(new Date());\n\n // `onValueChange` is fired explicitly per-path below (not through the hook), because commits\n // happen on blur / picker-select rather than on every keystroke.\n const [currentValue, setCurrentValue] = useControllableState<DateRange | null>({\n prop: valueProp,\n defaultProp: defaultValue ?? null,\n });\n\n const canClear = allowClear && !!currentValue && !disabled && !readOnly;\n const showPicker = !disabled && !readOnly;\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const newValue = event.target.value;\n setInputValue(newValue);\n onChange?.(event);\n\n const parsedRange = parseDateRange(newValue);\n if (parsedRange !== null || !newValue.trim()) {\n onValueChange?.(parsedRange);\n }\n };\n\n const handleFocus: FocusEventHandler<HTMLInputElement> = (event) => {\n setInputValue(formatDateRange(currentValue, ''));\n setHasFocus(true);\n onFocus?.(event);\n };\n\n const handleBlur: FocusEventHandler<HTMLInputElement> = (event) => {\n setHasFocus(false);\n onBlur?.(event);\n\n // If the field still shows the formatted current value (focused and blurred\n // without editing), keep it as-is. `formatDateRange` uses `toLocaleDateString`,\n // whose output is not reliably parseable by `new Date(...)` in every locale, so\n // round-tripping an untouched value through `parseDateRange` could wrongly null it.\n const text = event.target.value;\n const parsedRange =\n text === formatDateRange(currentValue, '') ? currentValue : parseDateRange(text);\n onValueBlur?.(parsedRange);\n\n setCurrentValue(parsedRange);\n };\n\n const handleDatePickerChange = (newValue: DateRange | undefined) => {\n const rangeValue = newValue ?? null;\n\n setCurrentValue(rangeValue);\n onValueChange?.(rangeValue);\n\n setHasFocus(false);\n };\n\n const handleClear = () => {\n if (!inputRef.current) return;\n inputRef.current.value = '';\n setInputValue('');\n setCurrentValue(null);\n onValueChange?.(null);\n onChange?.(createChangeInputEvent(inputRef.current));\n };\n\n const handleOpenChange = (open: boolean) => {\n if (open) {\n setMonth(currentValue?.from ?? new Date());\n }\n setIsOpen(open);\n };\n\n const displayValue = hasFocus ? inputValue : formatDateRange(currentValue, '');\n\n return (\n <InputGroup\n state={state}\n variant={variant}\n sizing={sizing}\n focusVariant={focusVariant}\n className={className}\n >\n <InputGroup.Input\n {...restInputProps}\n ref={mergeRefs(ref ?? null, inputRef)}\n type=\"text\"\n value={displayValue}\n placeholder={placeholder}\n onChange={handleChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n disabled={disabled}\n readOnly={readOnly}\n />\n\n {(canClear || showPicker) && (\n <InputGroup.Addon align=\"inline-end\">\n {canClear && (\n <InputGroup.Button\n aria-label=\"Clear date range\"\n onMouseDown={(event) => event.preventDefault()}\n onClick={handleClear}\n >\n <X className=\"tw:size-4\" />\n </InputGroup.Button>\n )}\n {showPicker && (\n <DatePicker\n endMonth={endMonth}\n mode=\"range\"\n month={month}\n onMonthChange={setMonth}\n onOpenChange={handleOpenChange}\n onSelect={handleDatePickerChange}\n open={isOpen}\n startMonth={startMonth}\n selected={currentValue ?? undefined}\n >\n <InputGroup.Button aria-label=\"Select date range\">\n <CalendarIcon className=\"tw:size-4\" />\n </InputGroup.Button>\n </DatePicker>\n )}\n </InputGroup.Addon>\n )}\n </InputGroup>\n );\n};\n"]}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { Loader2, Google } from './chunk-RQVK4IYC.js';
|
|
2
|
+
import { cn } from './chunk-LXLIQ2D6.js';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var LABELS = {
|
|
7
|
+
signin: "Sign in with Google",
|
|
8
|
+
signup: "Sign up with Google",
|
|
9
|
+
continue: "Continue with Google",
|
|
10
|
+
"signin-short": "Sign in"
|
|
11
|
+
};
|
|
12
|
+
var GOOGLE_FONT_STACK = "'Roboto', arial, sans-serif";
|
|
13
|
+
var variants = cva(
|
|
14
|
+
[
|
|
15
|
+
"tailwindcss-preflight",
|
|
16
|
+
"tw:inline-flex",
|
|
17
|
+
"tw:items-center",
|
|
18
|
+
"tw:justify-center",
|
|
19
|
+
"tw:h-10",
|
|
20
|
+
"tw:border",
|
|
21
|
+
"tw:text-sm",
|
|
22
|
+
// Literal weight (Google spec = 500). The `tw:font-*` scale is brand-overridable
|
|
23
|
+
// (`--font-weight-*`), and this button must stay brand-independent.
|
|
24
|
+
"tw:font-[500]",
|
|
25
|
+
"tw:leading-none",
|
|
26
|
+
"tw:whitespace-nowrap",
|
|
27
|
+
"tw:select-none",
|
|
28
|
+
"tw:cursor-pointer",
|
|
29
|
+
"tw:transition-shadow",
|
|
30
|
+
"tw:[&_svg]:shrink-0",
|
|
31
|
+
// focus — a neutral Google-blue ring, independent of the active brand.
|
|
32
|
+
"tw:focus-visible:outline-hidden",
|
|
33
|
+
"tw:focus-visible:ring-2",
|
|
34
|
+
"tw:focus-visible:ring-[#4285f4]/60",
|
|
35
|
+
// disabled
|
|
36
|
+
"tw:disabled:cursor-not-allowed",
|
|
37
|
+
"tw:disabled:opacity-60",
|
|
38
|
+
// dark treatment — auto-applied under html[data-theme=dark], overriding
|
|
39
|
+
// whichever `variant` is active (the ancestor selector out-specifies the
|
|
40
|
+
// variant's plain color classes).
|
|
41
|
+
"tw:[[data-theme=dark]_&]:bg-[#131314]",
|
|
42
|
+
"tw:[[data-theme=dark]_&]:text-[#e3e3e3]",
|
|
43
|
+
"tw:[[data-theme=dark]_&]:border-[#8e918f]",
|
|
44
|
+
"tw:[[data-theme=dark]_&]:hover:not-disabled:bg-[#1e1f20]",
|
|
45
|
+
"tw:[[data-theme=dark]_&]:hover:not-disabled:shadow-none"
|
|
46
|
+
],
|
|
47
|
+
{
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
variant: "default",
|
|
50
|
+
shape: "rectangular",
|
|
51
|
+
size: "default"
|
|
52
|
+
},
|
|
53
|
+
variants: {
|
|
54
|
+
// Google's approved light-scheme treatments; dark (above) overrides both.
|
|
55
|
+
variant: {
|
|
56
|
+
default: [
|
|
57
|
+
"tw:bg-white",
|
|
58
|
+
"tw:text-[#1f1f1f]",
|
|
59
|
+
"tw:border-[#747775]",
|
|
60
|
+
"tw:hover:not-disabled:bg-[#f7f8f8]",
|
|
61
|
+
"tw:hover:not-disabled:shadow-[0_1px_2px_0_rgba(60,64,67,0.30),0_1px_3px_1px_rgba(60,64,67,0.15)]"
|
|
62
|
+
],
|
|
63
|
+
neutral: [
|
|
64
|
+
"tw:bg-[#f2f2f2]",
|
|
65
|
+
"tw:text-[#1f1f1f]",
|
|
66
|
+
"tw:border-transparent",
|
|
67
|
+
"tw:hover:not-disabled:bg-[#e8eaed]"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
shape: {
|
|
71
|
+
rectangular: ["tw:rounded"],
|
|
72
|
+
circle: ["tw:rounded-full"]
|
|
73
|
+
},
|
|
74
|
+
size: {
|
|
75
|
+
default: ["tw:gap-2.5", "tw:px-3"],
|
|
76
|
+
icon: ["tw:w-10", "tw:p-0"]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
var GoogleButton = ({
|
|
82
|
+
ref,
|
|
83
|
+
variant = "default",
|
|
84
|
+
shape = "rectangular",
|
|
85
|
+
size = "default",
|
|
86
|
+
label = "signin",
|
|
87
|
+
isLoading = false,
|
|
88
|
+
disabled = false,
|
|
89
|
+
type = "button",
|
|
90
|
+
className,
|
|
91
|
+
children,
|
|
92
|
+
style,
|
|
93
|
+
...buttonProps
|
|
94
|
+
}) => /* @__PURE__ */ jsxs(
|
|
95
|
+
"button",
|
|
96
|
+
{
|
|
97
|
+
...buttonProps,
|
|
98
|
+
ref,
|
|
99
|
+
type,
|
|
100
|
+
disabled,
|
|
101
|
+
style: { ...style, fontFamily: GOOGLE_FONT_STACK },
|
|
102
|
+
className: cn(variants({ variant, shape, size }), className),
|
|
103
|
+
children: [
|
|
104
|
+
isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "tw:size-5 tw:shrink-0 tw:animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Google, { className: "tw:size-5" }),
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
"span",
|
|
107
|
+
{
|
|
108
|
+
className: cn({
|
|
109
|
+
"tw:sr-only": size === "icon"
|
|
110
|
+
}),
|
|
111
|
+
children: children ?? LABELS[label]
|
|
112
|
+
}
|
|
113
|
+
)
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
export { GoogleButton };
|
|
119
|
+
//# sourceMappingURL=chunk-6NN35XOP.js.map
|
|
120
|
+
//# sourceMappingURL=chunk-6NN35XOP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/blocks/GoogleButton/GoogleButton.tsx"],"names":[],"mappings":";;;;;AAOA,IAAM,MAAA,GAAS;AAAA,EACb,MAAA,EAAQ,qBAAA;AAAA,EACR,MAAA,EAAQ,qBAAA;AAAA,EACR,QAAA,EAAU,sBAAA;AAAA,EACV,cAAA,EAAgB;AAClB,CAAA;AAEA,IAAM,iBAAA,GAAoB,6BAAA;AAE1B,IAAM,QAAA,GAAW,GAAA;AAAA,EACf;AAAA,IACE,uBAAA;AAAA,IACA,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,mBAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA;AAAA,IACA,YAAA;AAAA;AAAA;AAAA,IAGA,eAAA;AAAA,IACA,iBAAA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AAA,EACP,SAAA;AAAA,EACA,QAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAG;AACL,CAAA,qBACE,IAAA;AAAA,EAAC,QAAA;AAAA,EAAA;AAAA,IACE,GAAG,WAAA;AAAA,IACJ,GAAA;AAAA,IACA,IAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA,EAAO,EAAE,GAAG,KAAA,EAAO,YAAY,iBAAA,EAAkB;AAAA,IACjD,SAAA,EAAW,GAAG,QAAA,CAAS,EAAE,SAAS,KAAA,EAAO,IAAA,EAAM,CAAA,EAAG,SAAS,CAAA;AAAA,IAE1D,QAAA,EAAA;AAAA,MAAA,SAAA,mBACC,GAAA,CAAC,OAAA,EAAA,EAAQ,SAAA,EAAU,uCAAA,EAAwC,aAAA,EAAY,QAAO,CAAA,mBAE9E,GAAA,CAAC,MAAA,EAAA,EAAO,SAAA,EAAU,WAAA,EAAY,CAAA;AAAA,sBAGhC,GAAA;AAAA,QAAC,MAAA;AAAA,QAAA;AAAA,UACC,WAAW,EAAA,CAAG;AAAA,YACZ,cAAc,IAAA,KAAS;AAAA,WACxB,CAAA;AAAA,UAEA,QAAA,EAAA,QAAA,IAAY,OAAO,KAAK;AAAA;AAAA;AAC3B;AAAA;AACF","file":"chunk-6NN35XOP.js","sourcesContent":["import type { ComponentPropsWithRef } from 'react';\nimport type { VariantProps } from 'class-variance-authority';\nimport { cva } from 'class-variance-authority';\n\nimport { Google, Loader2 } from '../../icons';\nimport { cn } from '../../utils';\n\nconst LABELS = {\n signin: 'Sign in with Google',\n signup: 'Sign up with Google',\n continue: 'Continue with Google',\n 'signin-short': 'Sign in',\n} as const;\n\nconst GOOGLE_FONT_STACK = \"'Roboto', arial, sans-serif\";\n\nconst variants = cva(\n [\n 'tailwindcss-preflight',\n 'tw:inline-flex',\n 'tw:items-center',\n 'tw:justify-center',\n 'tw:h-10',\n 'tw:border',\n 'tw:text-sm',\n // Literal weight (Google spec = 500). The `tw:font-*` scale is brand-overridable\n // (`--font-weight-*`), and this button must stay brand-independent.\n 'tw:font-[500]',\n 'tw:leading-none',\n 'tw:whitespace-nowrap',\n 'tw:select-none',\n 'tw:cursor-pointer',\n 'tw:transition-shadow',\n 'tw:[&_svg]:shrink-0',\n\n // focus — a neutral Google-blue ring, independent of the active brand.\n 'tw:focus-visible:outline-hidden',\n 'tw:focus-visible:ring-2',\n 'tw:focus-visible:ring-[#4285f4]/60',\n\n // disabled\n 'tw:disabled:cursor-not-allowed',\n 'tw:disabled:opacity-60',\n\n // dark treatment — auto-applied under html[data-theme=dark], overriding\n // whichever `variant` is active (the ancestor selector out-specifies the\n // variant's plain color classes).\n 'tw:[[data-theme=dark]_&]:bg-[#131314]',\n 'tw:[[data-theme=dark]_&]:text-[#e3e3e3]',\n 'tw:[[data-theme=dark]_&]:border-[#8e918f]',\n 'tw:[[data-theme=dark]_&]:hover:not-disabled:bg-[#1e1f20]',\n 'tw:[[data-theme=dark]_&]:hover:not-disabled:shadow-none',\n ],\n {\n defaultVariants: {\n variant: 'default',\n shape: 'rectangular',\n size: 'default',\n },\n variants: {\n // Google's approved light-scheme treatments; dark (above) overrides both.\n variant: {\n default: [\n 'tw:bg-white',\n 'tw:text-[#1f1f1f]',\n 'tw:border-[#747775]',\n 'tw:hover:not-disabled:bg-[#f7f8f8]',\n 'tw:hover:not-disabled:shadow-[0_1px_2px_0_rgba(60,64,67,0.30),0_1px_3px_1px_rgba(60,64,67,0.15)]',\n ],\n neutral: [\n 'tw:bg-[#f2f2f2]',\n 'tw:text-[#1f1f1f]',\n 'tw:border-transparent',\n 'tw:hover:not-disabled:bg-[#e8eaed]',\n ],\n },\n shape: {\n rectangular: ['tw:rounded'],\n circle: ['tw:rounded-full'],\n },\n size: {\n default: ['tw:gap-2.5', 'tw:px-3'],\n icon: ['tw:w-10', 'tw:p-0'],\n },\n },\n },\n);\n\ntype Props = ComponentPropsWithRef<'button'> &\n VariantProps<typeof variants> & {\n label?: keyof typeof LABELS;\n isLoading?: boolean;\n };\n\nexport const GoogleButton = ({\n ref,\n variant = 'default',\n shape = 'rectangular',\n size = 'default',\n label = 'signin',\n isLoading = false,\n disabled = false,\n type = 'button',\n className,\n children,\n style,\n ...buttonProps\n}: Props) => (\n <button\n {...buttonProps}\n ref={ref}\n type={type}\n disabled={disabled}\n style={{ ...style, fontFamily: GOOGLE_FONT_STACK }}\n className={cn(variants({ variant, shape, size }), className)}\n >\n {isLoading ? (\n <Loader2 className=\"tw:size-5 tw:shrink-0 tw:animate-spin\" aria-hidden=\"true\" />\n ) : (\n <Google className=\"tw:size-5\" />\n )}\n\n <span\n className={cn({\n 'tw:sr-only': size === 'icon',\n })}\n >\n {children ?? LABELS[label]}\n </span>\n </button>\n);\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn } from './chunk-LXLIQ2D6.js';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
var DOT_CLASS_NAME = cn("tw:h-1.5", "tw:w-1.5", "tw:rounded-full", "tw:bg-muted-foreground");
|
|
5
|
+
var DotsLoader = ({ className }) => {
|
|
6
|
+
return /* @__PURE__ */ jsxs(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
className: cn(
|
|
10
|
+
"tw:relative tw:-m-0.5 tw:flex tw:items-center tw:justify-center tw:gap-1",
|
|
11
|
+
className
|
|
12
|
+
),
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsx("div", { className: cn(DOT_CLASS_NAME, "tw:animate-dot-pulse-1") }),
|
|
15
|
+
/* @__PURE__ */ jsx("div", { className: cn(DOT_CLASS_NAME, "tw:animate-dot-pulse-2") }),
|
|
16
|
+
/* @__PURE__ */ jsx("div", { className: cn(DOT_CLASS_NAME, "tw:animate-dot-pulse-3") })
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { DotsLoader };
|
|
23
|
+
//# sourceMappingURL=chunk-6NZBVA4T.js.map
|
|
24
|
+
//# sourceMappingURL=chunk-6NZBVA4T.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/DotsLoader.tsx"],"names":[],"mappings":";;;AAMA,IAAM,cAAA,GAAiB,EAAA,CAAG,UAAA,EAAY,UAAA,EAAY,mBAAmB,wBAAwB,CAAA;AAEtF,IAAM,UAAA,GAAa,CAAC,EAAE,SAAA,EAAU,KAAuB;AAC5D,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,0EAAA;AAAA,QACA;AAAA,OACF;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,cAAA,EAAgB,wBAAwB,CAAA,EAAG,CAAA;AAAA,4BAC7D,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,cAAA,EAAgB,wBAAwB,CAAA,EAAG,CAAA;AAAA,4BAC7D,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,cAAA,EAAgB,wBAAwB,CAAA,EAAG;AAAA;AAAA;AAAA,GAChE;AAEJ","file":"chunk-6NZBVA4T.js","sourcesContent":["import { cn } from '../utils/classNames';\n\ntype DotsLoaderProps = {\n className?: string;\n};\n\nconst DOT_CLASS_NAME = cn('tw:h-1.5', 'tw:w-1.5', 'tw:rounded-full', 'tw:bg-muted-foreground');\n\nexport const DotsLoader = ({ className }: DotsLoaderProps) => {\n return (\n <div\n className={cn(\n 'tw:relative tw:-m-0.5 tw:flex tw:items-center tw:justify-center tw:gap-1',\n className,\n )}\n >\n <div className={cn(DOT_CLASS_NAME, 'tw:animate-dot-pulse-1')} />\n <div className={cn(DOT_CLASS_NAME, 'tw:animate-dot-pulse-2')} />\n <div className={cn(DOT_CLASS_NAME, 'tw:animate-dot-pulse-3')} />\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { Loader2, X, AlertCircle, CircleCheck, Info, AlertTriangle } from './chunk-RQVK4IYC.js';
|
|
2
|
+
import { useArgoDesign } from './chunk-WETKNYZX.js';
|
|
3
|
+
import { cn } from './chunk-LXLIQ2D6.js';
|
|
4
|
+
import { toast as toast$1 } from 'sonner';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var ToastAction = ({ ref, className, ...rest }) => /* @__PURE__ */ jsx(
|
|
9
|
+
"button",
|
|
10
|
+
{
|
|
11
|
+
...rest,
|
|
12
|
+
ref,
|
|
13
|
+
"data-slot": "toast-action",
|
|
14
|
+
type: "button",
|
|
15
|
+
className: cn(
|
|
16
|
+
// layout
|
|
17
|
+
"tw:col-start-3",
|
|
18
|
+
"tw:row-start-1",
|
|
19
|
+
"tw:flex",
|
|
20
|
+
"tw:items-center",
|
|
21
|
+
"tw:justify-center",
|
|
22
|
+
// font
|
|
23
|
+
"tw:text-xs",
|
|
24
|
+
"tw:font-medium",
|
|
25
|
+
"tw:text-primary",
|
|
26
|
+
// sizing
|
|
27
|
+
"tw:px-2",
|
|
28
|
+
"tw:h-6",
|
|
29
|
+
// styles
|
|
30
|
+
"tw:bg-primary-foreground",
|
|
31
|
+
"tw:rounded",
|
|
32
|
+
className
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
var ToastDescription = ({ ref, className, children, ...rest }) => /* @__PURE__ */ jsx(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
ref,
|
|
40
|
+
"data-slot": "toast-description",
|
|
41
|
+
className: cn(
|
|
42
|
+
"tw:col-start-2",
|
|
43
|
+
"tw:font-normal",
|
|
44
|
+
"tw:break-words",
|
|
45
|
+
"tw:text-white",
|
|
46
|
+
"tw:group-data-[variant=default]/toast:text-muted-foreground",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
...rest,
|
|
50
|
+
children
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
var ToastDismiss = ({ ref, className, ...rest }) => /* @__PURE__ */ jsxs(
|
|
54
|
+
"button",
|
|
55
|
+
{
|
|
56
|
+
ref,
|
|
57
|
+
"data-slot": "toast-dismiss",
|
|
58
|
+
className: cn(
|
|
59
|
+
"tw:flex",
|
|
60
|
+
"tw:justify-center",
|
|
61
|
+
"tw:col-start-4",
|
|
62
|
+
"tw:row-start-1",
|
|
63
|
+
"tailwindcss-preflight",
|
|
64
|
+
"tw:[&_svg]:aspect-square",
|
|
65
|
+
'tw:[&_svg:not([class*="tw:size-"])]:size-4',
|
|
66
|
+
"tw:[&_svg]:m-1",
|
|
67
|
+
"tw:text-white",
|
|
68
|
+
"tw:group-data-[variant=default]/toast:[&_svg]:text-popover-foreground",
|
|
69
|
+
"tw:group-data-[variant=default]/toast:group-data-[argo=true]/toast:[&_svg]:text-foreground",
|
|
70
|
+
className
|
|
71
|
+
),
|
|
72
|
+
type: "button",
|
|
73
|
+
...rest,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ jsx(X, {}),
|
|
76
|
+
/* @__PURE__ */ jsx("span", { className: "tw:sr-only", children: "Dismiss" })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
var ToastDuration = ({ ref, duration, className, style, ...rest }) => /* @__PURE__ */ jsx(
|
|
81
|
+
"span",
|
|
82
|
+
{
|
|
83
|
+
...rest,
|
|
84
|
+
ref,
|
|
85
|
+
className: cn(
|
|
86
|
+
"tw:bg-white/30",
|
|
87
|
+
"tw:group-data-[variant=default]/toast:bg-popover-foreground/20",
|
|
88
|
+
"tw:group-data-[variant=default]/toast:group-data-[argo=true]/toast:bg-foreground/20",
|
|
89
|
+
"tw:rounded-bl-lg",
|
|
90
|
+
"tw:mx-px",
|
|
91
|
+
// positioning
|
|
92
|
+
"tw:absolute",
|
|
93
|
+
"tw:bottom-0",
|
|
94
|
+
"tw:left-0",
|
|
95
|
+
// sizing
|
|
96
|
+
"tw:h-1",
|
|
97
|
+
// animation
|
|
98
|
+
"tw:animate-toast-progress",
|
|
99
|
+
"tw:group-hover/toast:[animation-play-state:paused]",
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
style: {
|
|
103
|
+
animationDuration: `${duration}ms`,
|
|
104
|
+
...style
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
var ToastTitle = ({ ref, className, children, ...rest }) => /* @__PURE__ */ jsx(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
ref,
|
|
112
|
+
"data-slot": "toast-title",
|
|
113
|
+
className: cn(
|
|
114
|
+
"tw:col-start-2",
|
|
115
|
+
"tw:text-sm",
|
|
116
|
+
"tw:leading-6",
|
|
117
|
+
"tw:min-h-6",
|
|
118
|
+
"tw:self-center",
|
|
119
|
+
"tw:text-white",
|
|
120
|
+
"tw:group-data-[variant=default]/toast:text-popover-foreground",
|
|
121
|
+
"tw:group-data-[variant=default]/toast:group-data-[argo=true]/toast:text-foreground",
|
|
122
|
+
"tw:break-words",
|
|
123
|
+
"tw:font-medium",
|
|
124
|
+
className
|
|
125
|
+
),
|
|
126
|
+
...rest,
|
|
127
|
+
children
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
var variants = cva(
|
|
131
|
+
[
|
|
132
|
+
"tailwindcss-preflight",
|
|
133
|
+
"tw:group/toast",
|
|
134
|
+
"tw:relative",
|
|
135
|
+
// layout
|
|
136
|
+
"tw:grid",
|
|
137
|
+
"tw:grid-cols-[0_1fr_auto_auto]",
|
|
138
|
+
"tw:items-start",
|
|
139
|
+
"tw:has-[[data-slot=toast-description]]:grid-rows-[auto_auto]",
|
|
140
|
+
"tw:has-[[data-slot=toast-icon]]:grid-cols-[auto_1fr_auto_auto]",
|
|
141
|
+
"tw:[&_[data-slot=toast-icon]]:mr-2",
|
|
142
|
+
"tw:[&_[data-slot=toast-title]]:mr-2.5",
|
|
143
|
+
"tw:[&_[data-slot=toast-description]]:mr-2.5",
|
|
144
|
+
"tw:[&_[data-slot=toast-action]]:mr-2",
|
|
145
|
+
"tw:[&_[data-slot=toast-description]]:col-end-3",
|
|
146
|
+
"tw:gap-y-0",
|
|
147
|
+
// styles
|
|
148
|
+
"tw:p-4",
|
|
149
|
+
"tw:rounded-lg",
|
|
150
|
+
"tw:shadow-md"
|
|
151
|
+
],
|
|
152
|
+
{
|
|
153
|
+
defaultVariants: {
|
|
154
|
+
variant: "info"
|
|
155
|
+
},
|
|
156
|
+
variants: {
|
|
157
|
+
variant: {
|
|
158
|
+
default: "tw:border tw:border-border tw:bg-popover",
|
|
159
|
+
error: "tw:bg-error-550",
|
|
160
|
+
info: "tw:bg-blue-600",
|
|
161
|
+
success: "tw:bg-green-700",
|
|
162
|
+
warning: "tw:bg-warning-550"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
);
|
|
167
|
+
var DEFAULT_VARIANT_ICON = {
|
|
168
|
+
error: /* @__PURE__ */ jsx(AlertTriangle, {}),
|
|
169
|
+
info: /* @__PURE__ */ jsx(Info, {}),
|
|
170
|
+
success: /* @__PURE__ */ jsx(CircleCheck, {}),
|
|
171
|
+
warning: /* @__PURE__ */ jsx(AlertCircle, {})
|
|
172
|
+
};
|
|
173
|
+
var ToastRoot = ({
|
|
174
|
+
id,
|
|
175
|
+
title,
|
|
176
|
+
description,
|
|
177
|
+
action,
|
|
178
|
+
duration = Infinity,
|
|
179
|
+
variant = "info",
|
|
180
|
+
loading = false,
|
|
181
|
+
icon: iconProp
|
|
182
|
+
}) => {
|
|
183
|
+
const renderArgo = useArgoDesign();
|
|
184
|
+
const icon = (() => {
|
|
185
|
+
if (loading) return /* @__PURE__ */ jsx(Loader2, { className: "tw:animate-spin" });
|
|
186
|
+
if (iconProp) return iconProp;
|
|
187
|
+
if (variant === "default" || variant === null) return null;
|
|
188
|
+
return DEFAULT_VARIANT_ICON[variant];
|
|
189
|
+
})();
|
|
190
|
+
const handleActionClick = (event) => {
|
|
191
|
+
toast$1.dismiss(id);
|
|
192
|
+
action?.onClick(event);
|
|
193
|
+
};
|
|
194
|
+
return /* @__PURE__ */ jsxs(
|
|
195
|
+
"div",
|
|
196
|
+
{
|
|
197
|
+
"data-variant": variant,
|
|
198
|
+
"data-argo": renderArgo,
|
|
199
|
+
className: cn(
|
|
200
|
+
variants({ variant }),
|
|
201
|
+
"tw:data-[variant=default]:data-[argo=true]:bg-background"
|
|
202
|
+
),
|
|
203
|
+
children: [
|
|
204
|
+
icon && /* @__PURE__ */ jsx(
|
|
205
|
+
"span",
|
|
206
|
+
{
|
|
207
|
+
"data-slot": "toast-icon",
|
|
208
|
+
className: cn(
|
|
209
|
+
"tw:inline-flex",
|
|
210
|
+
"tw:items-center",
|
|
211
|
+
"tw:justify-center",
|
|
212
|
+
"tw:self-center",
|
|
213
|
+
"tw:aspect-square",
|
|
214
|
+
"tw:size-5",
|
|
215
|
+
"tw:shrink-0",
|
|
216
|
+
'tw:[&_svg:not([class*="tw:size-"])]:size-5',
|
|
217
|
+
"tw:text-white",
|
|
218
|
+
"tw:group-data-[variant=default]/toast:text-popover-foreground",
|
|
219
|
+
"tw:group-data-[variant=default]/toast:group-data-[argo=true]/toast:text-foreground"
|
|
220
|
+
),
|
|
221
|
+
children: icon
|
|
222
|
+
}
|
|
223
|
+
),
|
|
224
|
+
/* @__PURE__ */ jsx(ToastTitle, { children: title }),
|
|
225
|
+
description && /* @__PURE__ */ jsx(ToastDescription, { children: description }),
|
|
226
|
+
action && /* @__PURE__ */ jsx(ToastAction, { style: action?.actionButtonStyle, onClick: handleActionClick, children: action.label }),
|
|
227
|
+
/* @__PURE__ */ jsx(ToastDismiss, { onClick: () => toast$1.dismiss(id) }),
|
|
228
|
+
duration !== Infinity && /* @__PURE__ */ jsx(ToastDuration, { duration })
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
);
|
|
232
|
+
};
|
|
233
|
+
var toast = ({
|
|
234
|
+
onAutoClose,
|
|
235
|
+
onDismiss,
|
|
236
|
+
testId,
|
|
237
|
+
toasterId,
|
|
238
|
+
dismissible = true,
|
|
239
|
+
position,
|
|
240
|
+
title: titleProp,
|
|
241
|
+
...toast2
|
|
242
|
+
}) => {
|
|
243
|
+
const duration = (() => {
|
|
244
|
+
if (typeof toast2.duration === "number") return toast2.duration;
|
|
245
|
+
if (toast2.variant === "error" || toast2.variant === "warning") return Infinity;
|
|
246
|
+
return toast2.duration ?? 5e3;
|
|
247
|
+
})();
|
|
248
|
+
const renderCustomToast = (id) => {
|
|
249
|
+
const title = typeof titleProp === "function" ? titleProp({ dismiss: () => toast$1.dismiss(id) }) : titleProp;
|
|
250
|
+
return /* @__PURE__ */ jsx(ToastRoot, { ...toast2, id, title, duration });
|
|
251
|
+
};
|
|
252
|
+
return toast$1.custom(renderCustomToast, {
|
|
253
|
+
// toast generated by sonner will always have an id, but we want to allow users to specify their own id if they want to
|
|
254
|
+
// can not pass undefined, as it will break dismiss
|
|
255
|
+
...toast2.id != null ? { id: toast2.id } : {},
|
|
256
|
+
unstyled: true,
|
|
257
|
+
position,
|
|
258
|
+
onAutoClose,
|
|
259
|
+
onDismiss,
|
|
260
|
+
testId,
|
|
261
|
+
toasterId,
|
|
262
|
+
dismissible,
|
|
263
|
+
duration,
|
|
264
|
+
// override default focus-visible styles to match our design
|
|
265
|
+
className: cn("tw:rounded-lg", "tw:focus-visible:!ring-4", "tw:focus-visible:!ring-ring/50")
|
|
266
|
+
});
|
|
267
|
+
};
|
|
268
|
+
toast.success = (title, options) => toast({
|
|
269
|
+
...options,
|
|
270
|
+
title,
|
|
271
|
+
variant: "success"
|
|
272
|
+
});
|
|
273
|
+
toast.error = (title, options) => toast({
|
|
274
|
+
...options,
|
|
275
|
+
title,
|
|
276
|
+
variant: "error",
|
|
277
|
+
duration: options?.duration ?? Infinity
|
|
278
|
+
});
|
|
279
|
+
toast.warning = (title, options) => toast({
|
|
280
|
+
...options,
|
|
281
|
+
title,
|
|
282
|
+
variant: "warning",
|
|
283
|
+
duration: options?.duration ?? Infinity
|
|
284
|
+
});
|
|
285
|
+
toast.info = (title, options) => toast({
|
|
286
|
+
...options,
|
|
287
|
+
title,
|
|
288
|
+
variant: "info"
|
|
289
|
+
});
|
|
290
|
+
toast.dismiss = (toastId) => toast$1.dismiss(toastId);
|
|
291
|
+
toast.dismissAll = () => toast$1.dismiss();
|
|
292
|
+
|
|
293
|
+
export { toast };
|
|
294
|
+
//# sourceMappingURL=chunk-6W5BHRCL.js.map
|
|
295
|
+
//# sourceMappingURL=chunk-6W5BHRCL.js.map
|