konsolpro-custom-ui 0.0.327
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/README.md +146 -0
- package/dist/chunks/accept-icon-X_bMUe5T.js +17 -0
- package/dist/chunks/account-balance-icon-CKxx1j3X.js +17 -0
- package/dist/chunks/add-circle-icon-D3XpY2oT.js +17 -0
- package/dist/chunks/add-icon-CZXR66VL.js +17 -0
- package/dist/chunks/alfa-icon-Cx0WqCux.js +17 -0
- package/dist/chunks/android-icon-6SCGu50U.js +17 -0
- package/dist/chunks/apple-icon-yya6O1xg.js +17 -0
- package/dist/chunks/arrow-back-icon-C_VwBDNK.js +17 -0
- package/dist/chunks/arrow-back-ios-icon-CB5K_mmJ.js +17 -0
- package/dist/chunks/arrow-down-icon-DFvg75P7.js +17 -0
- package/dist/chunks/arrow-forward-icon-BI4dm_L2.js +17 -0
- package/dist/chunks/arrow-left-icon-8yWT42A8.js +17 -0
- package/dist/chunks/arrow-right-icon-Bnx7GHux.js +17 -0
- package/dist/chunks/arrow-up-icon-DU7VVzN8.js +17 -0
- package/dist/chunks/attach-file-icon-OrT7tthI.js +17 -0
- package/dist/chunks/autorenew-icon-B0bI6Xt-.js +17 -0
- package/dist/chunks/baltiyskiy-icon-CXAJY9LH.js +17 -0
- package/dist/chunks/bill-error-icon-q8_KROAY.js +17 -0
- package/dist/chunks/bill-icon-Cw2GE_VB.js +17 -0
- package/dist/chunks/bill-in-progress-icon-BTsO5Mh5.js +17 -0
- package/dist/chunks/bill-warning-icon-3Y-dONd_.js +17 -0
- package/dist/chunks/bills-error-icon-CcDGUJrx.js +17 -0
- package/dist/chunks/bills-icon-BU_adAs0.js +17 -0
- package/dist/chunks/bills-in-progress-icon-RVEtPz7l.js +17 -0
- package/dist/chunks/bills-warning-icon-CNgWvumi.js +17 -0
- package/dist/chunks/block-icon-DGlp9c33.js +17 -0
- package/dist/chunks/bolt-fill-icon-DZjyKq8N.js +17 -0
- package/dist/chunks/bolt-icon-CJsvLlL-.js +17 -0
- package/dist/chunks/book-icon-BdaCKIQB.js +17 -0
- package/dist/chunks/business-center-icon-C5X-e-6I.js +17 -0
- package/dist/chunks/calendar-icon-B1cogiSd.js +17 -0
- package/dist/chunks/call-icon-DslHaQOP.js +17 -0
- package/dist/chunks/cancel-fill-DPYenlCk.js +17 -0
- package/dist/chunks/check-circle-fill-ne1MhahL.js +17 -0
- package/dist/chunks/check-circle-icon-BWhJprgU.js +17 -0
- package/dist/chunks/close-icon-CtbXesC0.js +17 -0
- package/dist/chunks/clsx-OuTLNxxd.js +16 -0
- package/dist/chunks/combobox-primitive-context-B_ldR_VA.js +4030 -0
- package/dist/chunks/cookie-DJ-U7h-A.js +17 -0
- package/dist/chunks/copy-icon-BWyncDVB.js +17 -0
- package/dist/chunks/credit-card-icon-DS1ckDU7.js +17 -0
- package/dist/chunks/delete-icon-Bk1ZmhBo.js +17 -0
- package/dist/chunks/document-icon-DcmQhRhY.js +17 -0
- package/dist/chunks/done-icon-BZEAL7mI.js +17 -0
- package/dist/chunks/download-icon-BvWPcT7W.js +17 -0
- package/dist/chunks/edit-icon-_3venQRC.js +17 -0
- package/dist/chunks/embla-carousel-react.esm-ZaRSnfTq.js +1252 -0
- package/dist/chunks/error-fill-icon--8j3Zcfq.js +17 -0
- package/dist/chunks/error-icon-BJWk5B-s.js +17 -0
- package/dist/chunks/error-icon-CgJ3zr06.js +17 -0
- package/dist/chunks/europa-icon-DbElF2Uc.js +17 -0
- package/dist/chunks/failed-icon-YP2jq4UN.js +17 -0
- package/dist/chunks/file-error-icon-630wBy1K.js +17 -0
- package/dist/chunks/file-success-icon-BTk5SYAM.js +17 -0
- package/dist/chunks/filter-icon-D_3_SQsN.js +17 -0
- package/dist/chunks/flag-icon-DmWEp4ya.js +17 -0
- package/dist/chunks/format-DoKcg9cH.js +1223 -0
- package/dist/chunks/full-screen-exit-icon-BHwq-9P-.js +17 -0
- package/dist/chunks/full-screen-icon-Dpl__xtk.js +17 -0
- package/dist/chunks/gazprom-icon-CRfKLTvP.js +17 -0
- package/dist/chunks/group-icon-BfSRHuvp.js +17 -0
- package/dist/chunks/help-icon-BMdlItds.js +17 -0
- package/dist/chunks/home-icon-Dc6LzbVw.js +17 -0
- package/dist/chunks/home-icon-Mag5Wxqq.js +17 -0
- package/dist/chunks/index-1Er1dKQf.js +13 -0
- package/dist/chunks/index-BJD1rYeT.js +57 -0
- package/dist/chunks/index-BO6p208a.js +48 -0
- package/dist/chunks/index-BZPx6jYI.js +8 -0
- package/dist/chunks/index-BxWD79NI.js +517 -0
- package/dist/chunks/index-ByaXH_ih.js +10 -0
- package/dist/chunks/index-CHDs-SiB.js +27 -0
- package/dist/chunks/index-CN5JEZ5H.js +79 -0
- package/dist/chunks/index-Ctjv6tIJ.js +1381 -0
- package/dist/chunks/index-DLcqcWxM.js +29 -0
- package/dist/chunks/index-DLeNytVF.js +9 -0
- package/dist/chunks/index-DYfkNB0n.js +54 -0
- package/dist/chunks/index-DuekHEmj.js +6 -0
- package/dist/chunks/index-DwYXX2sM.js +13 -0
- package/dist/chunks/index-E4d_Gd-w.js +91 -0
- package/dist/chunks/index-I8P2QgPV.js +258 -0
- package/dist/chunks/index-NPrw3_0K.js +14 -0
- package/dist/chunks/index-PsqJG3fE.js +75 -0
- package/dist/chunks/info-fill-icon-BzE09Xg8.js +17 -0
- package/dist/chunks/info-icon-BcUNe5kE.js +17 -0
- package/dist/chunks/inventory-icon-CFV8amBs.js +17 -0
- package/dist/chunks/link-icon-BUAymb0P.js +17 -0
- package/dist/chunks/list-icon-ChePCGxK.js +17 -0
- package/dist/chunks/location-icon-Bf9Wbg65.js +17 -0
- package/dist/chunks/logout-icon-DN86wp7N.js +17 -0
- package/dist/chunks/mail-icon-DCZPsZFE.js +17 -0
- package/dist/chunks/manage-accounts-icon-BkyuUTj3.js +17 -0
- package/dist/chunks/menu-icon-DWObHD95.js +17 -0
- package/dist/chunks/mkb-icon-CEkVt-7P.js +17 -0
- package/dist/chunks/more-horiz-icon-CSK7Ackl.js +17 -0
- package/dist/chunks/more-vert-icon-NA1tYTse.js +17 -0
- package/dist/chunks/mts-icon-Bq4YDYEy.js +17 -0
- package/dist/chunks/normal-icon-CYvIFN5j.js +17 -0
- package/dist/chunks/north-east-icon-Dh7-1BBW.js +17 -0
- package/dist/chunks/open-in-full-icon-DzhRd5Mx.js +17 -0
- package/dist/chunks/open-in-new-icon-A7MgnnyP.js +17 -0
- package/dist/chunks/otkritie-icon-yGwVocEY.js +17 -0
- package/dist/chunks/otp-icon-BQQXMe3b.js +17 -0
- package/dist/chunks/outgoing-main-icon-BAH2vddG.js +17 -0
- package/dist/chunks/page-info-icon-BiVNFu71.js +17 -0
- package/dist/chunks/passport-main-DNL65kJJ.js +17 -0
- package/dist/chunks/passport-registration-BGywpRar.js +17 -0
- package/dist/chunks/passport-selfie-Dsqd0uOf.js +17 -0
- package/dist/chunks/payment-icon-C-B7L4WP.js +17 -0
- package/dist/chunks/person-add-C-3pZhgM.js +17 -0
- package/dist/chunks/person-icon-Bo5NxPRQ.js +17 -0
- package/dist/chunks/person-search-icon-CwVm_XAL.js +17 -0
- package/dist/chunks/pincode-icon-BA-e4pBH.js +17 -0
- package/dist/chunks/play-icon-Bnj3hsIf.js +17 -0
- package/dist/chunks/popover-kFSgc5Lv.js +748 -0
- package/dist/chunks/progress-activity-icon-YbJGzvxH.js +17 -0
- package/dist/chunks/psb-icon-CxKzLVG5.js +17 -0
- package/dist/chunks/qiwi-icon-B795Q_fW.js +17 -0
- package/dist/chunks/raiffeisen-icon-CgcBX8eY.js +17 -0
- package/dist/chunks/refresh-icon-ac1oOwX8.js +17 -0
- package/dist/chunks/remove-icon-CTuoG0Vq.js +17 -0
- package/dist/chunks/ru-CUCVR8Pn.js +661 -0
- package/dist/chunks/russian-standart-icon-CI8j1Do6.js +17 -0
- package/dist/chunks/saint-petersburg-icon-DbffjI2W.js +17 -0
- package/dist/chunks/save-icon-DnF5revo.js +17 -0
- package/dist/chunks/sber-icon-b7d9_o7J.js +17 -0
- package/dist/chunks/sberid-icon-DgQtjRjD.js +17 -0
- package/dist/chunks/scenario-icon-BcnFsqUA.js +17 -0
- package/dist/chunks/scroll-area-TRRhxrjX.js +629 -0
- package/dist/chunks/search-icon-CortrXrC.js +17 -0
- package/dist/chunks/segment-icon-Bzm7cziF.js +17 -0
- package/dist/chunks/send-icon-BTztERTu.js +17 -0
- package/dist/chunks/settings-icon-D_wgjUsM.js +17 -0
- package/dist/chunks/shield-icon-BwpxkU5E.js +17 -0
- package/dist/chunks/signed-icon-DTQlKmWU.js +17 -0
- package/dist/chunks/skb-icon-BgDQolTL.js +17 -0
- package/dist/chunks/sms-icon-4p-ON5VX.js +17 -0
- package/dist/chunks/support-icon-CBHKGKq8.js +17 -0
- package/dist/chunks/tbank-icon-ByKW0pBb.js +17 -0
- package/dist/chunks/telegramm-icon-C2ZR2jdg.js +17 -0
- package/dist/chunks/thumbs-up-icon-BArjyDfk.js +17 -0
- package/dist/chunks/time-icon-DsWMo47L.js +17 -0
- package/dist/chunks/tinkoffid-icon-C6lsspZk.js +19 -0
- package/dist/chunks/tochka-icon-CoQ_r9Lz.js +17 -0
- package/dist/chunks/tooltip-BxRtZLBR.js +836 -0
- package/dist/chunks/trending-down-icon-DlHKI37F.js +17 -0
- package/dist/chunks/trending-up-icon-IEwGHi9c.js +17 -0
- package/dist/chunks/trust-icon-DcfUVGZ_.js +17 -0
- package/dist/chunks/tslib.es6-fInlAbov.js +27 -0
- package/dist/chunks/unfold-icon-S3J7xXHf.js +17 -0
- package/dist/chunks/uni-icon-gK006vr0.js +17 -0
- package/dist/chunks/upload-icon-CwzthQEL.js +17 -0
- package/dist/chunks/uploader-BN38rjbw.js +28387 -0
- package/dist/chunks/uralsib-icon-C-ZbdvlL.js +17 -0
- package/dist/chunks/uralskiy-icon-Djqv-ZYN.js +17 -0
- package/dist/chunks/utils-TbLXCoKm.js +2752 -0
- package/dist/chunks/visibility-off-icon-BA_I97Vw.js +17 -0
- package/dist/chunks/visibility-on-icon-C9VmKsvX.js +17 -0
- package/dist/chunks/vozrozhdenie-icon-CCMRNn95.js +17 -0
- package/dist/chunks/vtb-icon-BtfO1_Gx.js +17 -0
- package/dist/chunks/waiting-icon-lpQJA4wB.js +17 -0
- package/dist/chunks/wallet-icon-D0r9bDRg.js +17 -0
- package/dist/chunks/warning-icon-BmlgMY27.js +17 -0
- package/dist/chunks/work-icon-D7I-74Mk.js +17 -0
- package/dist/chunks/yandex-icon-CepqpI49.js +17 -0
- package/dist/chunks/zoom-in-icon-ZWEJANob.js +17 -0
- package/dist/chunks/zoom-out-icon-CeFz3G6V.js +17 -0
- package/dist/fonts/CoFoSansMono-Regular.otf +0 -0
- package/dist/fonts/Graphik-Bold.otf +0 -0
- package/dist/fonts/Graphik-Medium.otf +0 -0
- package/dist/fonts/Graphik-Regular.otf +0 -0
- package/dist/lib/icon/icon.js +38 -0
- package/dist/lib/icon/icons.js +353 -0
- package/dist/lib/icon/index.js +4 -0
- package/dist/lib/icon-banks/icon-banks.js +21 -0
- package/dist/lib/icon-banks/icons-banks.js +106 -0
- package/dist/lib/icon-banks/index.js +4 -0
- package/dist/lib/icon-documents/icon-document.js +26 -0
- package/dist/lib/icon-documents/icons-document.js +57 -0
- package/dist/lib/icon-documents/index.js +4 -0
- package/dist/lib/index.js +192 -0
- package/dist/lib/ui/accordion.js +474 -0
- package/dist/lib/ui/alert.js +8 -0
- package/dist/lib/ui/autocomplete.js +110 -0
- package/dist/lib/ui/avatar.js +333 -0
- package/dist/lib/ui/button.js +37 -0
- package/dist/lib/ui/calendar.js +121 -0
- package/dist/lib/ui/card.js +121 -0
- package/dist/lib/ui/carousel.js +55 -0
- package/dist/lib/ui/checkbox.js +363 -0
- package/dist/lib/ui/combobox-base/combobox-base.js +16 -0
- package/dist/lib/ui/combobox-base/index.js +4 -0
- package/dist/lib/ui/combobox-primitive/combobox-primitive-context.js +7 -0
- package/dist/lib/ui/combobox-primitive/components/Item.js +9 -0
- package/dist/lib/ui/combobox-primitive/components/combobox-actions.js +35 -0
- package/dist/lib/ui/combobox-primitive/components/combobox-container.js +59 -0
- package/dist/lib/ui/combobox-primitive/components/combobox-input.js +52 -0
- package/dist/lib/ui/combobox-primitive/components/combobox-item-renderer.js +101 -0
- package/dist/lib/ui/combobox-primitive/components/combobox-menu.js +56 -0
- package/dist/lib/ui/combobox-primitive/components/index.js +18 -0
- package/dist/lib/ui/combobox-primitive/components/item-view.js +53 -0
- package/dist/lib/ui/combobox-primitive/components/list.js +9 -0
- package/dist/lib/ui/combobox-primitive/constants.js +129 -0
- package/dist/lib/ui/combobox-primitive/hooks.js +31 -0
- package/dist/lib/ui/combobox-primitive/index.js +21 -0
- package/dist/lib/ui/combobox-primitive/types.js +1 -0
- package/dist/lib/ui/combobox-primitive/utils.js +60 -0
- package/dist/lib/ui/combobox.js +9 -0
- package/dist/lib/ui/command.js +1016 -0
- package/dist/lib/ui/customizable-carousel.js +431 -0
- package/dist/lib/ui/date-picker.js +288 -0
- package/dist/lib/ui/date-range-picker/constants.js +25 -0
- package/dist/lib/ui/date-range-picker/locales.js +116 -0
- package/dist/lib/ui/date-range-picker.js +392 -0
- package/dist/lib/ui/dialog/dialog-base/dialog-base.js +9 -0
- package/dist/lib/ui/dialog/dialog-base/index.js +6 -0
- package/dist/lib/ui/dialog/dialog-base/use-base-dialog.js +57 -0
- package/dist/lib/ui/dialog/dialog-primitive/dialog-primitive.js +17 -0
- package/dist/lib/ui/dialog/dialog-primitive/index.js +4 -0
- package/dist/lib/ui/dialog/index.js +7 -0
- package/dist/lib/ui/dialog/utils.js +32 -0
- package/dist/lib/ui/divider.js +8 -0
- package/dist/lib/ui/dropdown.js +13 -0
- package/dist/lib/ui/input-number/index.js +4 -0
- package/dist/lib/ui/input-number/input-number.js +6 -0
- package/dist/lib/ui/input.js +12 -0
- package/dist/lib/ui/link.js +167 -0
- package/dist/lib/ui/masked-input.js +6 -0
- package/dist/lib/ui/modal.js +41 -0
- package/dist/lib/ui/otp-input.js +8 -0
- package/dist/lib/ui/phone-input/constants.js +21 -0
- package/dist/lib/ui/phone-input/locales/ru.json.js +277 -0
- package/dist/lib/ui/phone-input/locales/tg.json.js +263 -0
- package/dist/lib/ui/phone-input/locales/uz.json.js +263 -0
- package/dist/lib/ui/phone-input/phone-input-utils.js +15 -0
- package/dist/lib/ui/phone-input/phone-input.js +20 -0
- package/dist/lib/ui/phone-input/phone-mask.js +261 -0
- package/dist/lib/ui/popover.js +10 -0
- package/dist/lib/ui/progress.js +140 -0
- package/dist/lib/ui/radio.js +10 -0
- package/dist/lib/ui/schedule-calendar/calendar-day-card.js +37 -0
- package/dist/lib/ui/schedule-calendar/constants.js +6 -0
- package/dist/lib/ui/schedule-calendar/embla-calendar-card.js +46 -0
- package/dist/lib/ui/schedule-calendar/embla-calendar-strip.js +52 -0
- package/dist/lib/ui/schedule-calendar/index.js +27 -0
- package/dist/lib/ui/schedule-calendar/schedule-calendar-strip.js +163 -0
- package/dist/lib/ui/schedule-calendar/schedule-header.js +66 -0
- package/dist/lib/ui/schedule-calendar/use-schedule-calendar.js +44 -0
- package/dist/lib/ui/schedule-calendar/use-schedule-sync.js +45 -0
- package/dist/lib/ui/schedule-calendar/utils.js +49 -0
- package/dist/lib/ui/scroll-area.js +7 -0
- package/dist/lib/ui/segments.js +376 -0
- package/dist/lib/ui/select.js +18 -0
- package/dist/lib/ui/spinner.js +57 -0
- package/dist/lib/ui/stepper.js +70 -0
- package/dist/lib/ui/switch.js +281 -0
- package/dist/lib/ui/tabs.js +301 -0
- package/dist/lib/ui/tag.js +113 -0
- package/dist/lib/ui/textarea.js +8 -0
- package/dist/lib/ui/time-picker.js +130 -0
- package/dist/lib/ui/time-range-picker.js +198 -0
- package/dist/lib/ui/timeline.js +36 -0
- package/dist/lib/ui/toaster.js +1002 -0
- package/dist/lib/ui/tooltip.js +10 -0
- package/dist/lib/ui/typography.js +36 -0
- package/dist/lib/ui/uploader.js +10 -0
- package/dist/styles/konsolpro-custom-ui.css +1 -0
- package/dist/styles/variables.css +279 -0
- package/dist/types/components/icon/icon.d.ts +10 -0
- package/dist/types/components/icon/icons.d.ts +105 -0
- package/dist/types/components/icon/index.d.ts +3 -0
- package/dist/types/components/icon-banks/icon-banks.d.ts +7 -0
- package/dist/types/components/icon-banks/icons-banks.d.ts +28 -0
- package/dist/types/components/icon-banks/index.d.ts +3 -0
- package/dist/types/components/icon-documents/icon-document.d.ts +9 -0
- package/dist/types/components/icon-documents/icons-document.d.ts +13 -0
- package/dist/types/components/icon-documents/index.d.ts +3 -0
- package/dist/types/components/index.d.ts +49 -0
- package/dist/types/components/ui/accordion.d.ts +13 -0
- package/dist/types/components/ui/alert.d.ts +16 -0
- package/dist/types/components/ui/autocomplete.d.ts +23 -0
- package/dist/types/components/ui/avatar.d.ts +27 -0
- package/dist/types/components/ui/button.d.ts +35 -0
- package/dist/types/components/ui/calendar.d.ts +4 -0
- package/dist/types/components/ui/card.d.ts +38 -0
- package/dist/types/components/ui/carousel.d.ts +11 -0
- package/dist/types/components/ui/checkbox.d.ts +26 -0
- package/dist/types/components/ui/combobox-base/combobox-base.d.ts +10 -0
- package/dist/types/components/ui/combobox-base/index.d.ts +1 -0
- package/dist/types/components/ui/combobox-primitive/combobox-primitive-context.d.ts +54 -0
- package/dist/types/components/ui/combobox-primitive/components/Item.d.ts +3 -0
- package/dist/types/components/ui/combobox-primitive/components/combobox-actions.d.ts +5 -0
- package/dist/types/components/ui/combobox-primitive/components/combobox-container.d.ts +5 -0
- package/dist/types/components/ui/combobox-primitive/components/combobox-input.d.ts +5 -0
- package/dist/types/components/ui/combobox-primitive/components/combobox-item-renderer.d.ts +10 -0
- package/dist/types/components/ui/combobox-primitive/components/combobox-menu.d.ts +6 -0
- package/dist/types/components/ui/combobox-primitive/components/index.d.ts +8 -0
- package/dist/types/components/ui/combobox-primitive/components/item-view.d.ts +3 -0
- package/dist/types/components/ui/combobox-primitive/components/list.d.ts +3 -0
- package/dist/types/components/ui/combobox-primitive/constants.d.ts +47 -0
- package/dist/types/components/ui/combobox-primitive/hooks.d.ts +8 -0
- package/dist/types/components/ui/combobox-primitive/index.d.ts +3 -0
- package/dist/types/components/ui/combobox-primitive/types.d.ts +62 -0
- package/dist/types/components/ui/combobox-primitive/utils.d.ts +25 -0
- package/dist/types/components/ui/combobox.d.ts +34 -0
- package/dist/types/components/ui/command.d.ts +78 -0
- package/dist/types/components/ui/customizable-carousel.d.ts +148 -0
- package/dist/types/components/ui/date-picker.d.ts +37 -0
- package/dist/types/components/ui/date-range-picker/constants.d.ts +22 -0
- package/dist/types/components/ui/date-range-picker/locales.d.ts +3 -0
- package/dist/types/components/ui/date-range-picker.d.ts +46 -0
- package/dist/types/components/ui/dialog/dialog-base/dialog-base.d.ts +41 -0
- package/dist/types/components/ui/dialog/dialog-base/index.d.ts +3 -0
- package/dist/types/components/ui/dialog/dialog-base/use-base-dialog.d.ts +35 -0
- package/dist/types/components/ui/dialog/dialog-primitive/dialog-primitive.d.ts +36 -0
- package/dist/types/components/ui/dialog/dialog-primitive/index.d.ts +2 -0
- package/dist/types/components/ui/dialog/index.d.ts +2 -0
- package/dist/types/components/ui/dialog/utils.d.ts +6 -0
- package/dist/types/components/ui/divider.d.ts +6 -0
- package/dist/types/components/ui/dropdown.d.ts +53 -0
- package/dist/types/components/ui/input-number/index.d.ts +2 -0
- package/dist/types/components/ui/input-number/input-number.d.ts +43 -0
- package/dist/types/components/ui/input.d.ts +58 -0
- package/dist/types/components/ui/link.d.ts +28 -0
- package/dist/types/components/ui/masked-input.d.ts +12 -0
- package/dist/types/components/ui/modal.d.ts +26 -0
- package/dist/types/components/ui/otp-input.d.ts +49 -0
- package/dist/types/components/ui/phone-input/constants.d.ts +18 -0
- package/dist/types/components/ui/phone-input/locales/ru.json.d.ts +252 -0
- package/dist/types/components/ui/phone-input/locales/tg.json.d.ts +261 -0
- package/dist/types/components/ui/phone-input/locales/uz.json.d.ts +261 -0
- package/dist/types/components/ui/phone-input/phone-input-utils.d.ts +2 -0
- package/dist/types/components/ui/phone-input/phone-input.d.ts +24 -0
- package/dist/types/components/ui/phone-input/phone-mask.d.ts +233 -0
- package/dist/types/components/ui/popover.d.ts +7 -0
- package/dist/types/components/ui/progress.d.ts +4 -0
- package/dist/types/components/ui/radio.d.ts +37 -0
- package/dist/types/components/ui/schedule-calendar/calendar-day-card.d.ts +9 -0
- package/dist/types/components/ui/schedule-calendar/constants.d.ts +3 -0
- package/dist/types/components/ui/schedule-calendar/embla-calendar-card.d.ts +9 -0
- package/dist/types/components/ui/schedule-calendar/embla-calendar-strip.d.ts +14 -0
- package/dist/types/components/ui/schedule-calendar/index.d.ts +16 -0
- package/dist/types/components/ui/schedule-calendar/schedule-calendar-strip.d.ts +36 -0
- package/dist/types/components/ui/schedule-calendar/schedule-header.d.ts +26 -0
- package/dist/types/components/ui/schedule-calendar/use-schedule-calendar.d.ts +27 -0
- package/dist/types/components/ui/schedule-calendar/use-schedule-sync.d.ts +39 -0
- package/dist/types/components/ui/schedule-calendar/utils.d.ts +12 -0
- package/dist/types/components/ui/scroll-area.d.ts +9 -0
- package/dist/types/components/ui/segments.d.ts +44 -0
- package/dist/types/components/ui/select.d.ts +95 -0
- package/dist/types/components/ui/spinner.d.ts +12 -0
- package/dist/types/components/ui/stepper.d.ts +11 -0
- package/dist/types/components/ui/switch.d.ts +24 -0
- package/dist/types/components/ui/tabs.d.ts +25 -0
- package/dist/types/components/ui/tag.d.ts +28 -0
- package/dist/types/components/ui/textarea.d.ts +17 -0
- package/dist/types/components/ui/time-picker.d.ts +15 -0
- package/dist/types/components/ui/time-range-picker.d.ts +26 -0
- package/dist/types/components/ui/timeline.d.ts +17 -0
- package/dist/types/components/ui/toaster.d.ts +45 -0
- package/dist/types/components/ui/tooltip.d.ts +8 -0
- package/dist/types/components/ui/typography.d.ts +25 -0
- package/dist/types/components/ui/uploader.d.ts +52 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/utils.d.ts +14 -0
- package/dist/types/main.d.ts +0 -0
- package/dist/types/utils/use-device-detector.d.ts +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +171 -0
|
@@ -0,0 +1,1002 @@
|
|
|
1
|
+
var se = Object.defineProperty, re = Object.defineProperties;
|
|
2
|
+
var oe = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var ht = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ft = Object.prototype.hasOwnProperty, Yt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Lt = (n, t, e) => t in n ? se(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e, c = (n, t) => {
|
|
6
|
+
for (var e in t || (t = {}))
|
|
7
|
+
Ft.call(t, e) && Lt(n, e, t[e]);
|
|
8
|
+
if (ht)
|
|
9
|
+
for (var e of ht(t))
|
|
10
|
+
Yt.call(t, e) && Lt(n, e, t[e]);
|
|
11
|
+
return n;
|
|
12
|
+
}, x = (n, t) => re(n, oe(t));
|
|
13
|
+
var pt = (n, t) => {
|
|
14
|
+
var e = {};
|
|
15
|
+
for (var s in n)
|
|
16
|
+
Ft.call(n, s) && t.indexOf(s) < 0 && (e[s] = n[s]);
|
|
17
|
+
if (n != null && ht)
|
|
18
|
+
for (var s of ht(n))
|
|
19
|
+
t.indexOf(s) < 0 && Yt.call(n, s) && (e[s] = n[s]);
|
|
20
|
+
return e;
|
|
21
|
+
};
|
|
22
|
+
var _t = (n, t, e) => new Promise((s, g) => {
|
|
23
|
+
var o = (v) => {
|
|
24
|
+
try {
|
|
25
|
+
T(e.next(v));
|
|
26
|
+
} catch (i) {
|
|
27
|
+
g(i);
|
|
28
|
+
}
|
|
29
|
+
}, d = (v) => {
|
|
30
|
+
try {
|
|
31
|
+
T(e.throw(v));
|
|
32
|
+
} catch (i) {
|
|
33
|
+
g(i);
|
|
34
|
+
}
|
|
35
|
+
}, T = (v) => v.done ? s(v.value) : Promise.resolve(v.value).then(o, d);
|
|
36
|
+
T((e = e.apply(n, t)).next());
|
|
37
|
+
});
|
|
38
|
+
import { jsx as j } from "react/jsx-runtime";
|
|
39
|
+
import r from "react";
|
|
40
|
+
import ie from "react-dom";
|
|
41
|
+
import { Icon as yt } from "../icon/icon.js";
|
|
42
|
+
import { Spinner as le } from "./spinner.js";
|
|
43
|
+
function de(n) {
|
|
44
|
+
if (typeof document == "undefined") return;
|
|
45
|
+
let t = document.head || document.getElementsByTagName("head")[0], e = document.createElement("style");
|
|
46
|
+
e.type = "text/css", t.appendChild(e), e.styleSheet ? e.styleSheet.cssText = n : e.appendChild(document.createTextNode(n));
|
|
47
|
+
}
|
|
48
|
+
const ce = (n) => {
|
|
49
|
+
switch (n) {
|
|
50
|
+
case "success":
|
|
51
|
+
return me;
|
|
52
|
+
case "info":
|
|
53
|
+
return he;
|
|
54
|
+
case "warning":
|
|
55
|
+
return ge;
|
|
56
|
+
case "error":
|
|
57
|
+
return pe;
|
|
58
|
+
default:
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
}, ue = Array(12).fill(0), fe = ({ visible: n, className: t }) => /* @__PURE__ */ r.createElement("div", {
|
|
62
|
+
className: [
|
|
63
|
+
"sonner-loading-wrapper",
|
|
64
|
+
t
|
|
65
|
+
].filter(Boolean).join(" "),
|
|
66
|
+
"data-visible": n
|
|
67
|
+
}, /* @__PURE__ */ r.createElement("div", {
|
|
68
|
+
className: "sonner-spinner"
|
|
69
|
+
}, ue.map((e, s) => /* @__PURE__ */ r.createElement("div", {
|
|
70
|
+
className: "sonner-loading-bar",
|
|
71
|
+
key: `spinner-bar-${s}`
|
|
72
|
+
})))), me = /* @__PURE__ */ r.createElement("svg", {
|
|
73
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
74
|
+
viewBox: "0 0 20 20",
|
|
75
|
+
fill: "currentColor",
|
|
76
|
+
height: "20",
|
|
77
|
+
width: "20"
|
|
78
|
+
}, /* @__PURE__ */ r.createElement("path", {
|
|
79
|
+
fillRule: "evenodd",
|
|
80
|
+
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
|
|
81
|
+
clipRule: "evenodd"
|
|
82
|
+
})), ge = /* @__PURE__ */ r.createElement("svg", {
|
|
83
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
84
|
+
viewBox: "0 0 24 24",
|
|
85
|
+
fill: "currentColor",
|
|
86
|
+
height: "20",
|
|
87
|
+
width: "20"
|
|
88
|
+
}, /* @__PURE__ */ r.createElement("path", {
|
|
89
|
+
fillRule: "evenodd",
|
|
90
|
+
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
91
|
+
clipRule: "evenodd"
|
|
92
|
+
})), he = /* @__PURE__ */ r.createElement("svg", {
|
|
93
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
94
|
+
viewBox: "0 0 20 20",
|
|
95
|
+
fill: "currentColor",
|
|
96
|
+
height: "20",
|
|
97
|
+
width: "20"
|
|
98
|
+
}, /* @__PURE__ */ r.createElement("path", {
|
|
99
|
+
fillRule: "evenodd",
|
|
100
|
+
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
|
|
101
|
+
clipRule: "evenodd"
|
|
102
|
+
})), pe = /* @__PURE__ */ r.createElement("svg", {
|
|
103
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
104
|
+
viewBox: "0 0 20 20",
|
|
105
|
+
fill: "currentColor",
|
|
106
|
+
height: "20",
|
|
107
|
+
width: "20"
|
|
108
|
+
}, /* @__PURE__ */ r.createElement("path", {
|
|
109
|
+
fillRule: "evenodd",
|
|
110
|
+
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
|
|
111
|
+
clipRule: "evenodd"
|
|
112
|
+
})), ye = /* @__PURE__ */ r.createElement("svg", {
|
|
113
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
114
|
+
width: "12",
|
|
115
|
+
height: "12",
|
|
116
|
+
viewBox: "0 0 24 24",
|
|
117
|
+
fill: "none",
|
|
118
|
+
stroke: "currentColor",
|
|
119
|
+
strokeWidth: "1.5",
|
|
120
|
+
strokeLinecap: "round",
|
|
121
|
+
strokeLinejoin: "round"
|
|
122
|
+
}, /* @__PURE__ */ r.createElement("line", {
|
|
123
|
+
x1: "18",
|
|
124
|
+
y1: "6",
|
|
125
|
+
x2: "6",
|
|
126
|
+
y2: "18"
|
|
127
|
+
}), /* @__PURE__ */ r.createElement("line", {
|
|
128
|
+
x1: "6",
|
|
129
|
+
y1: "6",
|
|
130
|
+
x2: "18",
|
|
131
|
+
y2: "18"
|
|
132
|
+
})), be = () => {
|
|
133
|
+
const [n, t] = r.useState(document.hidden);
|
|
134
|
+
return r.useEffect(() => {
|
|
135
|
+
const e = () => {
|
|
136
|
+
t(document.hidden);
|
|
137
|
+
};
|
|
138
|
+
return document.addEventListener("visibilitychange", e), () => window.removeEventListener("visibilitychange", e);
|
|
139
|
+
}, []), n;
|
|
140
|
+
};
|
|
141
|
+
let It = 1;
|
|
142
|
+
class ve {
|
|
143
|
+
constructor() {
|
|
144
|
+
this.subscribe = (t) => (this.subscribers.push(t), () => {
|
|
145
|
+
const e = this.subscribers.indexOf(t);
|
|
146
|
+
this.subscribers.splice(e, 1);
|
|
147
|
+
}), this.publish = (t) => {
|
|
148
|
+
this.subscribers.forEach((e) => e(t));
|
|
149
|
+
}, this.addToast = (t) => {
|
|
150
|
+
this.publish(t), this.toasts = [
|
|
151
|
+
...this.toasts,
|
|
152
|
+
t
|
|
153
|
+
];
|
|
154
|
+
}, this.create = (t) => {
|
|
155
|
+
var e;
|
|
156
|
+
const v = t, { message: s } = v, g = pt(v, ["message"]), o = typeof (t == null ? void 0 : t.id) == "number" || ((e = t.id) == null ? void 0 : e.length) > 0 ? t.id : It++, d = this.toasts.find((i) => i.id === o), T = t.dismissible === void 0 ? !0 : t.dismissible;
|
|
157
|
+
return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), d ? this.toasts = this.toasts.map((i) => i.id === o ? (this.publish(x(c(c({}, i), t), {
|
|
158
|
+
id: o,
|
|
159
|
+
title: s
|
|
160
|
+
})), x(c(c({}, i), t), {
|
|
161
|
+
id: o,
|
|
162
|
+
dismissible: T,
|
|
163
|
+
title: s
|
|
164
|
+
})) : i) : this.addToast(x(c({
|
|
165
|
+
title: s
|
|
166
|
+
}, g), {
|
|
167
|
+
dismissible: T,
|
|
168
|
+
id: o
|
|
169
|
+
})), o;
|
|
170
|
+
}, this.dismiss = (t) => (t ? (this.dismissedToasts.add(t), requestAnimationFrame(() => this.subscribers.forEach((e) => e({
|
|
171
|
+
id: t,
|
|
172
|
+
dismiss: !0
|
|
173
|
+
})))) : this.toasts.forEach((e) => {
|
|
174
|
+
this.subscribers.forEach((s) => s({
|
|
175
|
+
id: e.id,
|
|
176
|
+
dismiss: !0
|
|
177
|
+
}));
|
|
178
|
+
}), t), this.message = (t, e) => this.create(x(c({}, e), {
|
|
179
|
+
message: t
|
|
180
|
+
})), this.error = (t, e) => this.create(x(c({}, e), {
|
|
181
|
+
message: t,
|
|
182
|
+
type: "error"
|
|
183
|
+
})), this.success = (t, e) => this.create(x(c({}, e), {
|
|
184
|
+
type: "success",
|
|
185
|
+
message: t
|
|
186
|
+
})), this.info = (t, e) => this.create(x(c({}, e), {
|
|
187
|
+
type: "info",
|
|
188
|
+
message: t
|
|
189
|
+
})), this.warning = (t, e) => this.create(x(c({}, e), {
|
|
190
|
+
type: "warning",
|
|
191
|
+
message: t
|
|
192
|
+
})), this.loading = (t, e) => this.create(x(c({}, e), {
|
|
193
|
+
type: "loading",
|
|
194
|
+
message: t
|
|
195
|
+
})), this.promise = (t, e) => {
|
|
196
|
+
if (!e)
|
|
197
|
+
return;
|
|
198
|
+
let s;
|
|
199
|
+
e.loading !== void 0 && (s = this.create(x(c({}, e), {
|
|
200
|
+
promise: t,
|
|
201
|
+
type: "loading",
|
|
202
|
+
message: e.loading,
|
|
203
|
+
description: typeof e.description != "function" ? e.description : void 0
|
|
204
|
+
})));
|
|
205
|
+
const g = Promise.resolve(t instanceof Function ? t() : t);
|
|
206
|
+
let o = s !== void 0, d;
|
|
207
|
+
const T = g.then((i) => _t(this, null, function* () {
|
|
208
|
+
if (d = [
|
|
209
|
+
"resolve",
|
|
210
|
+
i
|
|
211
|
+
], r.isValidElement(i))
|
|
212
|
+
o = !1, this.create({
|
|
213
|
+
id: s,
|
|
214
|
+
type: "default",
|
|
215
|
+
message: i
|
|
216
|
+
});
|
|
217
|
+
else if (we(i) && !i.ok) {
|
|
218
|
+
o = !1;
|
|
219
|
+
const a = typeof e.error == "function" ? yield e.error(`HTTP error! status: ${i.status}`) : e.error, z = typeof e.description == "function" ? yield e.description(`HTTP error! status: ${i.status}`) : e.description, S = typeof a == "object" && !r.isValidElement(a) ? a : {
|
|
220
|
+
message: a
|
|
221
|
+
};
|
|
222
|
+
this.create(c({
|
|
223
|
+
id: s,
|
|
224
|
+
type: "error",
|
|
225
|
+
description: z
|
|
226
|
+
}, S));
|
|
227
|
+
} else if (i instanceof Error) {
|
|
228
|
+
o = !1;
|
|
229
|
+
const a = typeof e.error == "function" ? yield e.error(i) : e.error, z = typeof e.description == "function" ? yield e.description(i) : e.description, S = typeof a == "object" && !r.isValidElement(a) ? a : {
|
|
230
|
+
message: a
|
|
231
|
+
};
|
|
232
|
+
this.create(c({
|
|
233
|
+
id: s,
|
|
234
|
+
type: "error",
|
|
235
|
+
description: z
|
|
236
|
+
}, S));
|
|
237
|
+
} else if (e.success !== void 0) {
|
|
238
|
+
o = !1;
|
|
239
|
+
const a = typeof e.success == "function" ? yield e.success(i) : e.success, z = typeof e.description == "function" ? yield e.description(i) : e.description, S = typeof a == "object" && !r.isValidElement(a) ? a : {
|
|
240
|
+
message: a
|
|
241
|
+
};
|
|
242
|
+
this.create(c({
|
|
243
|
+
id: s,
|
|
244
|
+
type: "success",
|
|
245
|
+
description: z
|
|
246
|
+
}, S));
|
|
247
|
+
}
|
|
248
|
+
})).catch((i) => _t(this, null, function* () {
|
|
249
|
+
if (d = [
|
|
250
|
+
"reject",
|
|
251
|
+
i
|
|
252
|
+
], e.error !== void 0) {
|
|
253
|
+
o = !1;
|
|
254
|
+
const N = typeof e.error == "function" ? yield e.error(i) : e.error, a = typeof e.description == "function" ? yield e.description(i) : e.description, F = typeof N == "object" && !r.isValidElement(N) ? N : {
|
|
255
|
+
message: N
|
|
256
|
+
};
|
|
257
|
+
this.create(c({
|
|
258
|
+
id: s,
|
|
259
|
+
type: "error",
|
|
260
|
+
description: a
|
|
261
|
+
}, F));
|
|
262
|
+
}
|
|
263
|
+
})).finally(() => {
|
|
264
|
+
o && (this.dismiss(s), s = void 0), e.finally == null || e.finally.call(e);
|
|
265
|
+
}), v = () => new Promise((i, N) => T.then(() => d[0] === "reject" ? N(d[1]) : i(d[1])).catch(N));
|
|
266
|
+
return typeof s != "string" && typeof s != "number" ? {
|
|
267
|
+
unwrap: v
|
|
268
|
+
} : Object.assign(s, {
|
|
269
|
+
unwrap: v
|
|
270
|
+
});
|
|
271
|
+
}, this.custom = (t, e) => {
|
|
272
|
+
const s = (e == null ? void 0 : e.id) || It++;
|
|
273
|
+
return this.create(c({
|
|
274
|
+
jsx: t(s),
|
|
275
|
+
id: s
|
|
276
|
+
}, e)), s;
|
|
277
|
+
}, this.getActiveToasts = () => this.toasts.filter((t) => !this.dismissedToasts.has(t.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
const _ = new ve(), xe = (n, t) => {
|
|
281
|
+
const e = (t == null ? void 0 : t.id) || It++;
|
|
282
|
+
return _.addToast(x(c({
|
|
283
|
+
title: n
|
|
284
|
+
}, t), {
|
|
285
|
+
id: e
|
|
286
|
+
})), e;
|
|
287
|
+
}, we = (n) => n && typeof n == "object" && "ok" in n && typeof n.ok == "boolean" && "status" in n && typeof n.status == "number", Ee = xe, Te = () => _.toasts, ke = () => _.getActiveToasts(), p = Object.assign(Ee, {
|
|
288
|
+
success: _.success,
|
|
289
|
+
info: _.info,
|
|
290
|
+
warning: _.warning,
|
|
291
|
+
error: _.error,
|
|
292
|
+
custom: _.custom,
|
|
293
|
+
message: _.message,
|
|
294
|
+
promise: _.promise,
|
|
295
|
+
dismiss: _.dismiss,
|
|
296
|
+
loading: _.loading
|
|
297
|
+
}, {
|
|
298
|
+
getHistory: Te,
|
|
299
|
+
getToasts: ke
|
|
300
|
+
});
|
|
301
|
+
de("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
302
|
+
function bt(n) {
|
|
303
|
+
return n.label !== void 0;
|
|
304
|
+
}
|
|
305
|
+
const Se = 3, Ne = "24px", _e = "16px", $t = 4e3, Ie = 356, Me = 14, De = 45, Re = 200;
|
|
306
|
+
function L(...n) {
|
|
307
|
+
return n.filter(Boolean).join(" ");
|
|
308
|
+
}
|
|
309
|
+
function Be(n) {
|
|
310
|
+
const [t, e] = n.split("-"), s = [];
|
|
311
|
+
return t && s.push(t), e && s.push(e), s;
|
|
312
|
+
}
|
|
313
|
+
const Ce = (n) => {
|
|
314
|
+
var t, e, s, g, o, d, T, v, i;
|
|
315
|
+
const { invert: N, toast: a, unstyled: z, interacting: F, setHeights: S, visibleToasts: vt, heights: m, index: Y, toasts: dt, expanded: et, removeToast: ct, defaultRichColors: H, closeButton: q, style: xt, cancelButtonStyle: ut, actionButtonStyle: wt, className: Et = "", descriptionClassName: $ = "", duration: G, position: at, gap: Tt, expandByDefault: P, classNames: u, icons: B, closeButtonAriaLabel: V = "Close toast" } = n, [C, nt] = r.useState(null), [f, y] = r.useState(null), [h, D] = r.useState(!1), [X, b] = r.useState(!1), [st, Q] = r.useState(!1), [rt, ot] = r.useState(!1), [Kt, Dt] = r.useState(!1), [Ut, kt] = r.useState(0), [Xt, Rt] = r.useState(0), it = r.useRef(a.duration || G || $t), Bt = r.useRef(null), K = r.useRef(null), Wt = Y === 0, qt = Y + 1 <= vt, I = a.type, J = a.dismissible !== !1, Gt = a.className || "", Qt = a.descriptionClassName || "", ft = r.useMemo(() => m.findIndex((l) => l.toastId === a.id) || 0, [
|
|
316
|
+
m,
|
|
317
|
+
a.id
|
|
318
|
+
]), Jt = r.useMemo(() => {
|
|
319
|
+
var l;
|
|
320
|
+
return (l = a.closeButton) != null ? l : q;
|
|
321
|
+
}, [
|
|
322
|
+
a.closeButton,
|
|
323
|
+
q
|
|
324
|
+
]), Ct = r.useMemo(() => a.duration || G || $t, [
|
|
325
|
+
a.duration,
|
|
326
|
+
G
|
|
327
|
+
]), St = r.useRef(0), Z = r.useRef(0), At = r.useRef(0), tt = r.useRef(null), [Zt, te] = at.split("-"), Ot = r.useMemo(() => m.reduce((l, w, k) => k >= ft ? l : l + w.height, 0), [
|
|
328
|
+
m,
|
|
329
|
+
ft
|
|
330
|
+
]), jt = be(), ee = a.invert || N, Nt = I === "loading";
|
|
331
|
+
Z.current = r.useMemo(() => ft * Tt + Ot, [
|
|
332
|
+
ft,
|
|
333
|
+
Ot
|
|
334
|
+
]), r.useEffect(() => {
|
|
335
|
+
it.current = Ct;
|
|
336
|
+
}, [
|
|
337
|
+
Ct
|
|
338
|
+
]), r.useEffect(() => {
|
|
339
|
+
D(!0);
|
|
340
|
+
}, []), r.useEffect(() => {
|
|
341
|
+
const l = K.current;
|
|
342
|
+
if (l) {
|
|
343
|
+
const w = l.getBoundingClientRect().height;
|
|
344
|
+
return Rt(w), S((k) => [
|
|
345
|
+
{
|
|
346
|
+
toastId: a.id,
|
|
347
|
+
height: w,
|
|
348
|
+
position: a.position
|
|
349
|
+
},
|
|
350
|
+
...k
|
|
351
|
+
]), () => S((k) => k.filter((M) => M.toastId !== a.id));
|
|
352
|
+
}
|
|
353
|
+
}, [
|
|
354
|
+
S,
|
|
355
|
+
a.id
|
|
356
|
+
]), r.useLayoutEffect(() => {
|
|
357
|
+
if (!h) return;
|
|
358
|
+
const l = K.current, w = l.style.height;
|
|
359
|
+
l.style.height = "auto";
|
|
360
|
+
const k = l.getBoundingClientRect().height;
|
|
361
|
+
l.style.height = w, Rt(k), S((M) => M.find((E) => E.toastId === a.id) ? M.map((E) => E.toastId === a.id ? x(c({}, E), {
|
|
362
|
+
height: k
|
|
363
|
+
}) : E) : [
|
|
364
|
+
{
|
|
365
|
+
toastId: a.id,
|
|
366
|
+
height: k,
|
|
367
|
+
position: a.position
|
|
368
|
+
},
|
|
369
|
+
...M
|
|
370
|
+
]);
|
|
371
|
+
}, [
|
|
372
|
+
h,
|
|
373
|
+
a.title,
|
|
374
|
+
a.description,
|
|
375
|
+
S,
|
|
376
|
+
a.id,
|
|
377
|
+
a.jsx,
|
|
378
|
+
a.action,
|
|
379
|
+
a.cancel
|
|
380
|
+
]);
|
|
381
|
+
const U = r.useCallback(() => {
|
|
382
|
+
b(!0), kt(Z.current), S((l) => l.filter((w) => w.toastId !== a.id)), setTimeout(() => {
|
|
383
|
+
ct(a);
|
|
384
|
+
}, Re);
|
|
385
|
+
}, [
|
|
386
|
+
a,
|
|
387
|
+
ct,
|
|
388
|
+
S,
|
|
389
|
+
Z
|
|
390
|
+
]);
|
|
391
|
+
r.useEffect(() => {
|
|
392
|
+
if (a.promise && I === "loading" || a.duration === 1 / 0 || a.type === "loading") return;
|
|
393
|
+
let l;
|
|
394
|
+
return et || F || jt ? (() => {
|
|
395
|
+
if (At.current < St.current) {
|
|
396
|
+
const M = (/* @__PURE__ */ new Date()).getTime() - St.current;
|
|
397
|
+
it.current = it.current - M;
|
|
398
|
+
}
|
|
399
|
+
At.current = (/* @__PURE__ */ new Date()).getTime();
|
|
400
|
+
})() : (() => {
|
|
401
|
+
it.current !== 1 / 0 && (St.current = (/* @__PURE__ */ new Date()).getTime(), l = setTimeout(() => {
|
|
402
|
+
a.onAutoClose == null || a.onAutoClose.call(a, a), U();
|
|
403
|
+
}, it.current));
|
|
404
|
+
})(), () => clearTimeout(l);
|
|
405
|
+
}, [
|
|
406
|
+
et,
|
|
407
|
+
F,
|
|
408
|
+
a,
|
|
409
|
+
I,
|
|
410
|
+
jt,
|
|
411
|
+
U
|
|
412
|
+
]), r.useEffect(() => {
|
|
413
|
+
a.delete && (U(), a.onDismiss == null || a.onDismiss.call(a, a));
|
|
414
|
+
}, [
|
|
415
|
+
U,
|
|
416
|
+
a.delete
|
|
417
|
+
]);
|
|
418
|
+
function ae() {
|
|
419
|
+
var l;
|
|
420
|
+
if (B != null && B.loading) {
|
|
421
|
+
var w;
|
|
422
|
+
return /* @__PURE__ */ r.createElement("div", {
|
|
423
|
+
className: L(u == null ? void 0 : u.loader, a == null || (w = a.classNames) == null ? void 0 : w.loader, "sonner-loader"),
|
|
424
|
+
"data-visible": I === "loading"
|
|
425
|
+
}, B.loading);
|
|
426
|
+
}
|
|
427
|
+
return /* @__PURE__ */ r.createElement(fe, {
|
|
428
|
+
className: L(u == null ? void 0 : u.loader, a == null || (l = a.classNames) == null ? void 0 : l.loader),
|
|
429
|
+
visible: I === "loading"
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
const ne = a.icon || (B == null ? void 0 : B[I]) || ce(I);
|
|
433
|
+
var zt, Ht;
|
|
434
|
+
return /* @__PURE__ */ r.createElement("li", {
|
|
435
|
+
tabIndex: 0,
|
|
436
|
+
ref: K,
|
|
437
|
+
className: L(Et, Gt, u == null ? void 0 : u.toast, a == null || (t = a.classNames) == null ? void 0 : t.toast, u == null ? void 0 : u.default, u == null ? void 0 : u[I], a == null || (e = a.classNames) == null ? void 0 : e[I]),
|
|
438
|
+
"data-sonner-toast": "",
|
|
439
|
+
"data-rich-colors": (zt = a.richColors) != null ? zt : H,
|
|
440
|
+
"data-styled": !(a.jsx || a.unstyled || z),
|
|
441
|
+
"data-mounted": h,
|
|
442
|
+
"data-promise": !!a.promise,
|
|
443
|
+
"data-swiped": Kt,
|
|
444
|
+
"data-removed": X,
|
|
445
|
+
"data-visible": qt,
|
|
446
|
+
"data-y-position": Zt,
|
|
447
|
+
"data-x-position": te,
|
|
448
|
+
"data-index": Y,
|
|
449
|
+
"data-front": Wt,
|
|
450
|
+
"data-swiping": st,
|
|
451
|
+
"data-dismissible": J,
|
|
452
|
+
"data-type": I,
|
|
453
|
+
"data-invert": ee,
|
|
454
|
+
"data-swipe-out": rt,
|
|
455
|
+
"data-swipe-direction": f,
|
|
456
|
+
"data-expanded": !!(et || P && h),
|
|
457
|
+
style: c(c({
|
|
458
|
+
"--index": Y,
|
|
459
|
+
"--toasts-before": Y,
|
|
460
|
+
"--z-index": dt.length - Y,
|
|
461
|
+
"--offset": `${X ? Ut : Z.current}px`,
|
|
462
|
+
"--initial-height": P ? "auto" : `${Xt}px`
|
|
463
|
+
}, xt), a.style),
|
|
464
|
+
onDragEnd: () => {
|
|
465
|
+
Q(!1), nt(null), tt.current = null;
|
|
466
|
+
},
|
|
467
|
+
onPointerDown: (l) => {
|
|
468
|
+
Nt || !J || (Bt.current = /* @__PURE__ */ new Date(), kt(Z.current), l.target.setPointerCapture(l.pointerId), l.target.tagName !== "BUTTON" && (Q(!0), tt.current = {
|
|
469
|
+
x: l.clientX,
|
|
470
|
+
y: l.clientY
|
|
471
|
+
}));
|
|
472
|
+
},
|
|
473
|
+
onPointerUp: () => {
|
|
474
|
+
var l, w, k;
|
|
475
|
+
if (rt || !J) return;
|
|
476
|
+
tt.current = null;
|
|
477
|
+
const M = Number(((l = K.current) == null ? void 0 : l.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), mt = Number(((w = K.current) == null ? void 0 : w.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), E = (/* @__PURE__ */ new Date()).getTime() - ((k = Bt.current) == null ? void 0 : k.getTime()), R = C === "x" ? M : mt, gt = Math.abs(R) / E;
|
|
478
|
+
if (Math.abs(R) >= De || gt > 0.11) {
|
|
479
|
+
kt(Z.current), a.onDismiss == null || a.onDismiss.call(a, a), y(C === "x" ? M > 0 ? "right" : "left" : mt > 0 ? "down" : "up"), U(), ot(!0);
|
|
480
|
+
return;
|
|
481
|
+
} else {
|
|
482
|
+
var A, O;
|
|
483
|
+
(A = K.current) == null || A.style.setProperty("--swipe-amount-x", "0px"), (O = K.current) == null || O.style.setProperty("--swipe-amount-y", "0px");
|
|
484
|
+
}
|
|
485
|
+
Dt(!1), Q(!1), nt(null);
|
|
486
|
+
},
|
|
487
|
+
onPointerMove: (l) => {
|
|
488
|
+
var w, k, M;
|
|
489
|
+
if (!tt.current || !J || ((w = window.getSelection()) == null ? void 0 : w.toString().length) > 0) return;
|
|
490
|
+
const E = l.clientY - tt.current.y, R = l.clientX - tt.current.x;
|
|
491
|
+
var gt;
|
|
492
|
+
const A = (gt = n.swipeDirections) != null ? gt : Be(at);
|
|
493
|
+
!C && (Math.abs(R) > 1 || Math.abs(E) > 1) && nt(Math.abs(R) > Math.abs(E) ? "x" : "y");
|
|
494
|
+
let O = {
|
|
495
|
+
x: 0,
|
|
496
|
+
y: 0
|
|
497
|
+
};
|
|
498
|
+
const Pt = (W) => 1 / (1.5 + Math.abs(W) / 20);
|
|
499
|
+
if (C === "y") {
|
|
500
|
+
if (A.includes("top") || A.includes("bottom"))
|
|
501
|
+
if (A.includes("top") && E < 0 || A.includes("bottom") && E > 0)
|
|
502
|
+
O.y = E;
|
|
503
|
+
else {
|
|
504
|
+
const W = E * Pt(E);
|
|
505
|
+
O.y = Math.abs(W) < Math.abs(E) ? W : E;
|
|
506
|
+
}
|
|
507
|
+
} else if (C === "x" && (A.includes("left") || A.includes("right")))
|
|
508
|
+
if (A.includes("left") && R < 0 || A.includes("right") && R > 0)
|
|
509
|
+
O.x = R;
|
|
510
|
+
else {
|
|
511
|
+
const W = R * Pt(R);
|
|
512
|
+
O.x = Math.abs(W) < Math.abs(R) ? W : R;
|
|
513
|
+
}
|
|
514
|
+
(Math.abs(O.x) > 0 || Math.abs(O.y) > 0) && Dt(!0), (k = K.current) == null || k.style.setProperty("--swipe-amount-x", `${O.x}px`), (M = K.current) == null || M.style.setProperty("--swipe-amount-y", `${O.y}px`);
|
|
515
|
+
}
|
|
516
|
+
}, Jt && !a.jsx && I !== "loading" ? /* @__PURE__ */ r.createElement("button", {
|
|
517
|
+
"aria-label": V,
|
|
518
|
+
"data-disabled": Nt,
|
|
519
|
+
"data-close-button": !0,
|
|
520
|
+
onClick: Nt || !J ? () => {
|
|
521
|
+
} : () => {
|
|
522
|
+
U(), a.onDismiss == null || a.onDismiss.call(a, a);
|
|
523
|
+
},
|
|
524
|
+
className: L(u == null ? void 0 : u.closeButton, a == null || (s = a.classNames) == null ? void 0 : s.closeButton)
|
|
525
|
+
}, (Ht = B == null ? void 0 : B.close) != null ? Ht : ye) : null, (I || a.icon || a.promise) && a.icon !== null && ((B == null ? void 0 : B[I]) !== null || a.icon) ? /* @__PURE__ */ r.createElement("div", {
|
|
526
|
+
"data-icon": "",
|
|
527
|
+
className: L(u == null ? void 0 : u.icon, a == null || (g = a.classNames) == null ? void 0 : g.icon)
|
|
528
|
+
}, a.promise || a.type === "loading" && !a.icon ? a.icon || ae() : null, a.type !== "loading" ? ne : null) : null, /* @__PURE__ */ r.createElement("div", {
|
|
529
|
+
"data-content": "",
|
|
530
|
+
className: L(u == null ? void 0 : u.content, a == null || (o = a.classNames) == null ? void 0 : o.content)
|
|
531
|
+
}, /* @__PURE__ */ r.createElement("div", {
|
|
532
|
+
"data-title": "",
|
|
533
|
+
className: L(u == null ? void 0 : u.title, a == null || (d = a.classNames) == null ? void 0 : d.title)
|
|
534
|
+
}, a.jsx ? a.jsx : typeof a.title == "function" ? a.title() : a.title), a.description ? /* @__PURE__ */ r.createElement("div", {
|
|
535
|
+
"data-description": "",
|
|
536
|
+
className: L($, Qt, u == null ? void 0 : u.description, a == null || (T = a.classNames) == null ? void 0 : T.description)
|
|
537
|
+
}, typeof a.description == "function" ? a.description() : a.description) : null), /* @__PURE__ */ r.isValidElement(a.cancel) ? a.cancel : a.cancel && bt(a.cancel) ? /* @__PURE__ */ r.createElement("button", {
|
|
538
|
+
"data-button": !0,
|
|
539
|
+
"data-cancel": !0,
|
|
540
|
+
style: a.cancelButtonStyle || ut,
|
|
541
|
+
onClick: (l) => {
|
|
542
|
+
bt(a.cancel) && J && (a.cancel.onClick == null || a.cancel.onClick.call(a.cancel, l), U());
|
|
543
|
+
},
|
|
544
|
+
className: L(u == null ? void 0 : u.cancelButton, a == null || (v = a.classNames) == null ? void 0 : v.cancelButton)
|
|
545
|
+
}, a.cancel.label) : null, /* @__PURE__ */ r.isValidElement(a.action) ? a.action : a.action && bt(a.action) ? /* @__PURE__ */ r.createElement("button", {
|
|
546
|
+
"data-button": !0,
|
|
547
|
+
"data-action": !0,
|
|
548
|
+
style: a.actionButtonStyle || wt,
|
|
549
|
+
onClick: (l) => {
|
|
550
|
+
bt(a.action) && (a.action.onClick == null || a.action.onClick.call(a.action, l), !l.defaultPrevented && U());
|
|
551
|
+
},
|
|
552
|
+
className: L(u == null ? void 0 : u.actionButton, a == null || (i = a.classNames) == null ? void 0 : i.actionButton)
|
|
553
|
+
}, a.action.label) : null);
|
|
554
|
+
};
|
|
555
|
+
function Vt() {
|
|
556
|
+
if (typeof window == "undefined" || typeof document == "undefined") return "ltr";
|
|
557
|
+
const n = document.documentElement.getAttribute("dir");
|
|
558
|
+
return n === "auto" || !n ? window.getComputedStyle(document.documentElement).direction : n;
|
|
559
|
+
}
|
|
560
|
+
function Ae(n, t) {
|
|
561
|
+
const e = {};
|
|
562
|
+
return [
|
|
563
|
+
n,
|
|
564
|
+
t
|
|
565
|
+
].forEach((s, g) => {
|
|
566
|
+
const o = g === 1, d = o ? "--mobile-offset" : "--offset", T = o ? _e : Ne;
|
|
567
|
+
function v(i) {
|
|
568
|
+
[
|
|
569
|
+
"top",
|
|
570
|
+
"right",
|
|
571
|
+
"bottom",
|
|
572
|
+
"left"
|
|
573
|
+
].forEach((N) => {
|
|
574
|
+
e[`${d}-${N}`] = typeof i == "number" ? `${i}px` : i;
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
typeof s == "number" || typeof s == "string" ? v(s) : typeof s == "object" ? [
|
|
578
|
+
"top",
|
|
579
|
+
"right",
|
|
580
|
+
"bottom",
|
|
581
|
+
"left"
|
|
582
|
+
].forEach((i) => {
|
|
583
|
+
s[i] === void 0 ? e[`${d}-${i}`] = T : e[`${d}-${i}`] = typeof s[i] == "number" ? `${s[i]}px` : s[i];
|
|
584
|
+
}) : v(T);
|
|
585
|
+
}), e;
|
|
586
|
+
}
|
|
587
|
+
const Oe = /* @__PURE__ */ r.forwardRef(function(t, e) {
|
|
588
|
+
const { invert: s, position: g = "bottom-right", hotkey: o = [
|
|
589
|
+
"altKey",
|
|
590
|
+
"KeyT"
|
|
591
|
+
], expand: d, closeButton: T, className: v, offset: i, mobileOffset: N, theme: a = "light", richColors: z, duration: F, style: S, visibleToasts: vt = Se, toastOptions: m, dir: Y = Vt(), gap: dt = Me, icons: et, containerAriaLabel: ct = "Notifications" } = t, [H, q] = r.useState([]), xt = r.useMemo(() => Array.from(new Set([
|
|
592
|
+
g
|
|
593
|
+
].concat(H.filter((f) => f.position).map((f) => f.position)))), [
|
|
594
|
+
H,
|
|
595
|
+
g
|
|
596
|
+
]), [ut, wt] = r.useState([]), [Et, $] = r.useState(!1), [G, at] = r.useState(!1), [Tt, P] = r.useState(a !== "system" ? a : typeof window != "undefined" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), u = r.useRef(null), B = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), V = r.useRef(null), C = r.useRef(!1), nt = r.useCallback((f) => {
|
|
597
|
+
q((y) => {
|
|
598
|
+
var h;
|
|
599
|
+
return (h = y.find((D) => D.id === f.id)) != null && h.delete || _.dismiss(f.id), y.filter(({ id: D }) => D !== f.id);
|
|
600
|
+
});
|
|
601
|
+
}, []);
|
|
602
|
+
return r.useEffect(() => _.subscribe((f) => {
|
|
603
|
+
if (f.dismiss) {
|
|
604
|
+
requestAnimationFrame(() => {
|
|
605
|
+
q((y) => y.map((h) => h.id === f.id ? x(c({}, h), {
|
|
606
|
+
delete: !0
|
|
607
|
+
}) : h));
|
|
608
|
+
});
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
setTimeout(() => {
|
|
612
|
+
ie.flushSync(() => {
|
|
613
|
+
q((y) => {
|
|
614
|
+
const h = y.findIndex((D) => D.id === f.id);
|
|
615
|
+
return h !== -1 ? [
|
|
616
|
+
...y.slice(0, h),
|
|
617
|
+
c(c({}, y[h]), f),
|
|
618
|
+
...y.slice(h + 1)
|
|
619
|
+
] : [
|
|
620
|
+
f,
|
|
621
|
+
...y
|
|
622
|
+
];
|
|
623
|
+
});
|
|
624
|
+
});
|
|
625
|
+
});
|
|
626
|
+
}), [
|
|
627
|
+
H
|
|
628
|
+
]), r.useEffect(() => {
|
|
629
|
+
if (a !== "system") {
|
|
630
|
+
P(a);
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
if (a === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? P("dark") : P("light")), typeof window == "undefined") return;
|
|
634
|
+
const f = window.matchMedia("(prefers-color-scheme: dark)");
|
|
635
|
+
try {
|
|
636
|
+
f.addEventListener("change", ({ matches: y }) => {
|
|
637
|
+
P(y ? "dark" : "light");
|
|
638
|
+
});
|
|
639
|
+
} catch (y) {
|
|
640
|
+
f.addListener(({ matches: h }) => {
|
|
641
|
+
try {
|
|
642
|
+
P(h ? "dark" : "light");
|
|
643
|
+
} catch (D) {
|
|
644
|
+
console.error(D);
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
}, [
|
|
649
|
+
a
|
|
650
|
+
]), r.useEffect(() => {
|
|
651
|
+
H.length <= 1 && $(!1);
|
|
652
|
+
}, [
|
|
653
|
+
H
|
|
654
|
+
]), r.useEffect(() => {
|
|
655
|
+
const f = (y) => {
|
|
656
|
+
var h;
|
|
657
|
+
if (o.every((b) => y[b] || y.code === b)) {
|
|
658
|
+
var X;
|
|
659
|
+
$(!0), (X = u.current) == null || X.focus();
|
|
660
|
+
}
|
|
661
|
+
y.code === "Escape" && (document.activeElement === u.current || (h = u.current) != null && h.contains(document.activeElement)) && $(!1);
|
|
662
|
+
};
|
|
663
|
+
return document.addEventListener("keydown", f), () => document.removeEventListener("keydown", f);
|
|
664
|
+
}, [
|
|
665
|
+
o
|
|
666
|
+
]), r.useEffect(() => {
|
|
667
|
+
if (u.current)
|
|
668
|
+
return () => {
|
|
669
|
+
V.current && (V.current.focus({
|
|
670
|
+
preventScroll: !0
|
|
671
|
+
}), V.current = null, C.current = !1);
|
|
672
|
+
};
|
|
673
|
+
}, [
|
|
674
|
+
u.current
|
|
675
|
+
]), // Remove item from normal navigation flow, only available via hotkey
|
|
676
|
+
/* @__PURE__ */ r.createElement("section", {
|
|
677
|
+
ref: e,
|
|
678
|
+
"aria-label": `${ct} ${B}`,
|
|
679
|
+
tabIndex: -1,
|
|
680
|
+
"aria-live": "polite",
|
|
681
|
+
"aria-relevant": "additions text",
|
|
682
|
+
"aria-atomic": "false",
|
|
683
|
+
suppressHydrationWarning: !0
|
|
684
|
+
}, xt.map((f, y) => {
|
|
685
|
+
var h;
|
|
686
|
+
const [D, X] = f.split("-");
|
|
687
|
+
return H.length ? /* @__PURE__ */ r.createElement("ol", {
|
|
688
|
+
key: f,
|
|
689
|
+
dir: Y === "auto" ? Vt() : Y,
|
|
690
|
+
tabIndex: -1,
|
|
691
|
+
ref: u,
|
|
692
|
+
className: v,
|
|
693
|
+
"data-sonner-toaster": !0,
|
|
694
|
+
"data-sonner-theme": Tt,
|
|
695
|
+
"data-y-position": D,
|
|
696
|
+
"data-x-position": X,
|
|
697
|
+
style: c(c({
|
|
698
|
+
"--front-toast-height": `${((h = ut[0]) == null ? void 0 : h.height) || 0}px`,
|
|
699
|
+
"--width": `${Ie}px`,
|
|
700
|
+
"--gap": `${dt}px`
|
|
701
|
+
}, S), Ae(i, N)),
|
|
702
|
+
onBlur: (b) => {
|
|
703
|
+
C.current && !b.currentTarget.contains(b.relatedTarget) && (C.current = !1, V.current && (V.current.focus({
|
|
704
|
+
preventScroll: !0
|
|
705
|
+
}), V.current = null));
|
|
706
|
+
},
|
|
707
|
+
onFocus: (b) => {
|
|
708
|
+
b.target instanceof HTMLElement && b.target.dataset.dismissible === "false" || C.current || (C.current = !0, V.current = b.relatedTarget);
|
|
709
|
+
},
|
|
710
|
+
onMouseEnter: () => $(!0),
|
|
711
|
+
onMouseMove: () => $(!0),
|
|
712
|
+
onMouseLeave: () => {
|
|
713
|
+
G || $(!1);
|
|
714
|
+
},
|
|
715
|
+
onDragEnd: () => $(!1),
|
|
716
|
+
onPointerDown: (b) => {
|
|
717
|
+
b.target instanceof HTMLElement && b.target.dataset.dismissible === "false" || at(!0);
|
|
718
|
+
},
|
|
719
|
+
onPointerUp: () => at(!1)
|
|
720
|
+
}, H.filter((b) => !b.position && y === 0 || b.position === f).map((b, st) => {
|
|
721
|
+
var Q, rt;
|
|
722
|
+
return /* @__PURE__ */ r.createElement(Ce, {
|
|
723
|
+
key: b.id,
|
|
724
|
+
icons: et,
|
|
725
|
+
index: st,
|
|
726
|
+
toast: b,
|
|
727
|
+
defaultRichColors: z,
|
|
728
|
+
duration: (Q = m == null ? void 0 : m.duration) != null ? Q : F,
|
|
729
|
+
className: m == null ? void 0 : m.className,
|
|
730
|
+
descriptionClassName: m == null ? void 0 : m.descriptionClassName,
|
|
731
|
+
invert: s,
|
|
732
|
+
visibleToasts: vt,
|
|
733
|
+
closeButton: (rt = m == null ? void 0 : m.closeButton) != null ? rt : T,
|
|
734
|
+
interacting: G,
|
|
735
|
+
position: f,
|
|
736
|
+
style: m == null ? void 0 : m.style,
|
|
737
|
+
unstyled: m == null ? void 0 : m.unstyled,
|
|
738
|
+
classNames: m == null ? void 0 : m.classNames,
|
|
739
|
+
cancelButtonStyle: m == null ? void 0 : m.cancelButtonStyle,
|
|
740
|
+
actionButtonStyle: m == null ? void 0 : m.actionButtonStyle,
|
|
741
|
+
closeButtonAriaLabel: m == null ? void 0 : m.closeButtonAriaLabel,
|
|
742
|
+
removeToast: nt,
|
|
743
|
+
toasts: H.filter((ot) => ot.position == b.position),
|
|
744
|
+
heights: ut.filter((ot) => ot.position == b.position),
|
|
745
|
+
setHeights: wt,
|
|
746
|
+
expandByDefault: d,
|
|
747
|
+
gap: dt,
|
|
748
|
+
expanded: Et,
|
|
749
|
+
swipeDirections: t.swipeDirections
|
|
750
|
+
});
|
|
751
|
+
})) : null;
|
|
752
|
+
}));
|
|
753
|
+
});
|
|
754
|
+
function Mt(n, t = /* @__PURE__ */ new Set()) {
|
|
755
|
+
const e = [];
|
|
756
|
+
if (typeof n == "string")
|
|
757
|
+
return n.trim() !== "" && e.push(n), e;
|
|
758
|
+
if (n instanceof Error) {
|
|
759
|
+
const s = n.message || n.name;
|
|
760
|
+
return s && s.trim() !== "" && e.push(s), e;
|
|
761
|
+
}
|
|
762
|
+
if (Array.isArray(n)) {
|
|
763
|
+
for (const s of n)
|
|
764
|
+
e.push(...Mt(s, t));
|
|
765
|
+
return e;
|
|
766
|
+
}
|
|
767
|
+
if (n && typeof n == "object" && !t.has(n)) {
|
|
768
|
+
t.add(n);
|
|
769
|
+
const s = [
|
|
770
|
+
"message",
|
|
771
|
+
"error",
|
|
772
|
+
"msg",
|
|
773
|
+
"text",
|
|
774
|
+
"description",
|
|
775
|
+
"detail",
|
|
776
|
+
"errors"
|
|
777
|
+
];
|
|
778
|
+
for (const g of s) {
|
|
779
|
+
const o = n;
|
|
780
|
+
g in o && e.push(...Mt(o[g], t));
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
if (typeof n != "object" && n !== null && n !== void 0) {
|
|
784
|
+
const s = String(n);
|
|
785
|
+
s.trim() !== "" && e.push(s);
|
|
786
|
+
}
|
|
787
|
+
return Array.from(new Set(e)).filter(
|
|
788
|
+
(s) => s !== "[object Object]"
|
|
789
|
+
);
|
|
790
|
+
}
|
|
791
|
+
function lt(n, t, e) {
|
|
792
|
+
const s = Mt(n);
|
|
793
|
+
return s.length === 0 ? (t && t(n), [e || "Произошла ошибка"]) : s;
|
|
794
|
+
}
|
|
795
|
+
function je(n, t) {
|
|
796
|
+
return p(n, t);
|
|
797
|
+
}
|
|
798
|
+
const Ve = Object.assign(je, {
|
|
799
|
+
success: (n, t) => {
|
|
800
|
+
const e = typeof n == "string" ? [(t == null ? void 0 : t.defaultMessage) || n] : lt(
|
|
801
|
+
n,
|
|
802
|
+
t == null ? void 0 : t.onExtractError,
|
|
803
|
+
t == null ? void 0 : t.defaultMessage
|
|
804
|
+
);
|
|
805
|
+
return e.length > 1 ? e.map((s) => (() => {
|
|
806
|
+
const o = p.success(
|
|
807
|
+
/* @__PURE__ */ j(
|
|
808
|
+
"div",
|
|
809
|
+
{
|
|
810
|
+
onClick: () => p.dismiss(o),
|
|
811
|
+
onKeyDown: (d) => {
|
|
812
|
+
(d.key === "Enter" || d.key === " ") && p.dismiss(o);
|
|
813
|
+
},
|
|
814
|
+
role: "button",
|
|
815
|
+
tabIndex: 0,
|
|
816
|
+
style: { cursor: "pointer", width: "100%" },
|
|
817
|
+
children: s
|
|
818
|
+
}
|
|
819
|
+
),
|
|
820
|
+
x(c({}, t), {
|
|
821
|
+
duration: 1 / 0,
|
|
822
|
+
unstyled: !1
|
|
823
|
+
})
|
|
824
|
+
);
|
|
825
|
+
return o;
|
|
826
|
+
})()) : p.success(e[0], t);
|
|
827
|
+
},
|
|
828
|
+
error: (n, t) => {
|
|
829
|
+
const e = typeof n == "string" ? [(t == null ? void 0 : t.defaultMessage) || n] : lt(
|
|
830
|
+
n,
|
|
831
|
+
t == null ? void 0 : t.onExtractError,
|
|
832
|
+
t == null ? void 0 : t.defaultMessage
|
|
833
|
+
);
|
|
834
|
+
return e.length > 1 ? e.map((s) => (() => {
|
|
835
|
+
const o = p.error(
|
|
836
|
+
/* @__PURE__ */ j(
|
|
837
|
+
"div",
|
|
838
|
+
{
|
|
839
|
+
onClick: () => p.dismiss(o),
|
|
840
|
+
onKeyDown: (d) => {
|
|
841
|
+
(d.key === "Enter" || d.key === " ") && p.dismiss(o);
|
|
842
|
+
},
|
|
843
|
+
role: "button",
|
|
844
|
+
tabIndex: 0,
|
|
845
|
+
style: { cursor: "pointer", width: "100%" },
|
|
846
|
+
children: s
|
|
847
|
+
}
|
|
848
|
+
),
|
|
849
|
+
x(c({}, t), {
|
|
850
|
+
duration: 1 / 0,
|
|
851
|
+
unstyled: !1
|
|
852
|
+
})
|
|
853
|
+
);
|
|
854
|
+
return o;
|
|
855
|
+
})()) : p.error(e[0], t);
|
|
856
|
+
},
|
|
857
|
+
info: (n, t) => {
|
|
858
|
+
const e = typeof n == "string" ? [(t == null ? void 0 : t.defaultMessage) || n] : lt(
|
|
859
|
+
n,
|
|
860
|
+
t == null ? void 0 : t.onExtractError,
|
|
861
|
+
t == null ? void 0 : t.defaultMessage
|
|
862
|
+
);
|
|
863
|
+
return e.length > 1 ? e.map((s) => (() => {
|
|
864
|
+
const o = p.info(
|
|
865
|
+
// Обертка с обработчиком клика для закрытия
|
|
866
|
+
/* @__PURE__ */ j(
|
|
867
|
+
"div",
|
|
868
|
+
{
|
|
869
|
+
onClick: () => p.dismiss(o),
|
|
870
|
+
onKeyDown: (d) => {
|
|
871
|
+
(d.key === "Enter" || d.key === " ") && p.dismiss(o);
|
|
872
|
+
},
|
|
873
|
+
role: "button",
|
|
874
|
+
tabIndex: 0,
|
|
875
|
+
style: { cursor: "pointer", width: "100%" },
|
|
876
|
+
children: s
|
|
877
|
+
}
|
|
878
|
+
),
|
|
879
|
+
x(c({}, t), {
|
|
880
|
+
duration: 1 / 0,
|
|
881
|
+
// Не скрываем автоматически
|
|
882
|
+
unstyled: !1
|
|
883
|
+
})
|
|
884
|
+
);
|
|
885
|
+
return o;
|
|
886
|
+
})()) : p.info(e[0], t);
|
|
887
|
+
},
|
|
888
|
+
warning: (n, t) => {
|
|
889
|
+
const e = typeof n == "string" ? [(t == null ? void 0 : t.defaultMessage) || n] : lt(
|
|
890
|
+
n,
|
|
891
|
+
t == null ? void 0 : t.onExtractError,
|
|
892
|
+
t == null ? void 0 : t.defaultMessage
|
|
893
|
+
);
|
|
894
|
+
return e.length > 1 ? e.map((s) => (() => {
|
|
895
|
+
const o = p.warning(
|
|
896
|
+
// Обертка с обработчиком клика для закрытия
|
|
897
|
+
/* @__PURE__ */ j(
|
|
898
|
+
"div",
|
|
899
|
+
{
|
|
900
|
+
onClick: () => p.dismiss(o),
|
|
901
|
+
onKeyDown: (d) => {
|
|
902
|
+
(d.key === "Enter" || d.key === " ") && p.dismiss(o);
|
|
903
|
+
},
|
|
904
|
+
role: "button",
|
|
905
|
+
tabIndex: 0,
|
|
906
|
+
style: { cursor: "pointer", width: "100%" },
|
|
907
|
+
children: s
|
|
908
|
+
}
|
|
909
|
+
),
|
|
910
|
+
x(c({}, t), {
|
|
911
|
+
duration: 1 / 0,
|
|
912
|
+
unstyled: !1
|
|
913
|
+
})
|
|
914
|
+
);
|
|
915
|
+
return o;
|
|
916
|
+
})()) : p.warning(e[0], t);
|
|
917
|
+
},
|
|
918
|
+
loading: (n, t) => {
|
|
919
|
+
const e = typeof n == "string" ? [(t == null ? void 0 : t.defaultMessage) || n] : lt(
|
|
920
|
+
n,
|
|
921
|
+
t == null ? void 0 : t.onExtractError,
|
|
922
|
+
t == null ? void 0 : t.defaultMessage
|
|
923
|
+
);
|
|
924
|
+
return e.length > 1 ? e.map((s) => (() => {
|
|
925
|
+
const o = p.loading(
|
|
926
|
+
/* @__PURE__ */ j(
|
|
927
|
+
"div",
|
|
928
|
+
{
|
|
929
|
+
onClick: () => p.dismiss(o),
|
|
930
|
+
onKeyDown: (d) => {
|
|
931
|
+
(d.key === "Enter" || d.key === " ") && p.dismiss(o);
|
|
932
|
+
},
|
|
933
|
+
role: "button",
|
|
934
|
+
tabIndex: 0,
|
|
935
|
+
style: { cursor: "pointer", width: "100%" },
|
|
936
|
+
children: s
|
|
937
|
+
}
|
|
938
|
+
),
|
|
939
|
+
x(c({}, t), {
|
|
940
|
+
unstyled: !1
|
|
941
|
+
})
|
|
942
|
+
);
|
|
943
|
+
return o;
|
|
944
|
+
})()) : p.loading(e[0], t);
|
|
945
|
+
},
|
|
946
|
+
dismiss: (n) => {
|
|
947
|
+
p.dismiss(n);
|
|
948
|
+
},
|
|
949
|
+
promise(n, o) {
|
|
950
|
+
var d = o, {
|
|
951
|
+
loading: t,
|
|
952
|
+
success: e,
|
|
953
|
+
error: s
|
|
954
|
+
} = d, g = pt(d, [
|
|
955
|
+
"loading",
|
|
956
|
+
"success",
|
|
957
|
+
"error"
|
|
958
|
+
]);
|
|
959
|
+
return p.promise(n, c({
|
|
960
|
+
loading: t,
|
|
961
|
+
success: e,
|
|
962
|
+
error: s
|
|
963
|
+
}, g));
|
|
964
|
+
}
|
|
965
|
+
});
|
|
966
|
+
function Ke(t) {
|
|
967
|
+
var n = pt(t, []);
|
|
968
|
+
return /* @__PURE__ */ j(
|
|
969
|
+
Oe,
|
|
970
|
+
c({
|
|
971
|
+
visibleToasts: 1 / 0,
|
|
972
|
+
gap: 4,
|
|
973
|
+
style: {
|
|
974
|
+
zIndex: 1020
|
|
975
|
+
},
|
|
976
|
+
className: "toaster group left-[0]! mx-auto! flex! w-auto! max-w-[100%]! flex-col! items-center! justify-center! max-sm:right-0! max-sm:w-full! md:left-[50%]! md:w-auto! md:max-w-[356px]! [&_[data-content]]:w-max [&_[data-sonner-toast]]:max-sm:right-auto! [&_[data-sonner-toast]]:max-sm:left-auto! [&_[data-title]]:line-clamp-2 [&_[data-title]]:font-normal!",
|
|
977
|
+
toastOptions: {
|
|
978
|
+
className: "text-white! font-graphik font-normal! bg-spotlight-background! border-spotlight-background! rounded-[1000px]! w-fit! md:w-auto! max-w-[92%]! md:max-w-[500px]! py-2.5! px-4! m-0! min-h-10 gap-2! text-center! align-center! cursor-pointer!",
|
|
979
|
+
style: {
|
|
980
|
+
// @ts-expect-error CSS custom properties are not typed in React's style object
|
|
981
|
+
"--z-index": 1020,
|
|
982
|
+
"z-index": "calc(var(--z-index) - var(--index))",
|
|
983
|
+
"--toast-icon-margin-start": "0px",
|
|
984
|
+
"--toast-icon-margin-end": "0px"
|
|
985
|
+
},
|
|
986
|
+
dismissible: !0
|
|
987
|
+
},
|
|
988
|
+
position: "top-center",
|
|
989
|
+
icons: {
|
|
990
|
+
success: /* @__PURE__ */ j(yt, { icon: "CheckCircleFillIcon", className: "text-positive" }),
|
|
991
|
+
info: /* @__PURE__ */ j(yt, { icon: "InfoFillIcon" }),
|
|
992
|
+
error: /* @__PURE__ */ j(yt, { icon: "CancelFillIcon", className: "text-destructive" }),
|
|
993
|
+
loading: /* @__PURE__ */ j(le, { className: "text-white" }),
|
|
994
|
+
warning: /* @__PURE__ */ j(yt, { icon: "InfoFillIcon", className: "text-warning" })
|
|
995
|
+
}
|
|
996
|
+
}, n)
|
|
997
|
+
);
|
|
998
|
+
}
|
|
999
|
+
export {
|
|
1000
|
+
Ke as Toaster,
|
|
1001
|
+
Ve as toast
|
|
1002
|
+
};
|