@pfct/purple 1.5.0-rc.1 → 1.5.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Icon/utils/svgr-cli.template.d.ts +7 -0
- package/dist/assets/index.css +1 -1
- package/dist/chunks/clsx.C11secjj.js +1 -0
- package/dist/chunks/clsx.OuTLNxxd.js +16 -0
- package/dist/chunks/index.52hLHqtl.js +671 -0
- package/dist/chunks/index.B1zCXH4b.js +1 -0
- package/dist/chunks/index.BFOvovu2.js +1 -0
- package/dist/chunks/index.BZPx6jYI.js +8 -0
- package/dist/chunks/index.C-8GI_iQ.js +5 -0
- package/dist/chunks/index.C4zsfJoH.js +1 -0
- package/dist/chunks/index.CHQFbaeH.js +41 -0
- package/dist/chunks/{index.LN3KW-I4.js → index.Cc-miKAT.js} +1 -1
- package/dist/chunks/index.Cdy_UEl-.js +1 -0
- package/dist/chunks/index.D-9nbSdR.js +205 -0
- package/dist/chunks/{index.styled.D_VcbV29.js → index.D0q0M2nK.js} +264 -326
- package/dist/chunks/index.D2jUN9AV.js +1 -0
- package/dist/chunks/index.D6z7cYa5.js +1 -0
- package/dist/chunks/index.DDo7KIbo.js +60 -0
- package/dist/chunks/index.DHAJ5bcO.js +1531 -0
- package/dist/chunks/index.DMhXgOEz.js +1 -0
- package/dist/chunks/index.DS2YScMD.js +27 -0
- package/dist/chunks/index.DYrg31YP.js +354 -0
- package/dist/chunks/index.Dh7jK0Mq.js +777 -0
- package/dist/chunks/index.DjUJriOp.js +1 -0
- package/dist/chunks/index.HA10ghBA.js +152 -0
- package/dist/chunks/index.Zd9j6m3g.js +1 -0
- package/dist/chunks/index.ak1mD2js.js +1 -0
- package/dist/chunks/index.eUOZnpu6.js +13 -0
- package/dist/chunks/index.nObpX_Vm.js +71 -0
- package/dist/chunks/index.vLV8RYs2.js +288 -0
- package/dist/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.es.js +289 -425
- package/dist/components/Badge/BaseBadge/index.cjs.js +1 -1
- package/dist/components/Badge/BaseBadge/index.es.js +1 -1
- package/dist/components/Badge/BaseBadge/index.styled.cjs.js +1 -1
- package/dist/components/Badge/BaseBadge/index.styled.es.js +1 -1
- package/dist/components/BottomSheet/BaseBottomSheet/index.cjs.js +1 -1
- package/dist/components/BottomSheet/BaseBottomSheet/index.es.js +22 -24
- package/dist/components/BottomSheet/NavBottomSheet/index.cjs.js +1 -1
- package/dist/components/BottomSheet/NavBottomSheet/index.es.js +1 -1
- package/dist/components/BottomSheet/TitleBottomSheet/index.cjs.js +1 -1
- package/dist/components/BottomSheet/TitleBottomSheet/index.es.js +1 -1
- package/dist/components/BottomSheet/index.cjs.js +1 -1
- package/dist/components/BottomSheet/index.es.js +1 -1
- package/dist/components/Button/BaseButton/index.cjs.js +1 -1
- package/dist/components/Button/BaseButton/index.es.js +1 -1
- package/dist/components/Button/DoubleButton/index.cjs.js +1 -1
- package/dist/components/Button/DoubleButton/index.es.js +1 -1
- package/dist/components/Button/FloatBaseButton/index.cjs.js +1 -1
- package/dist/components/Button/FloatBaseButton/index.es.js +1 -1
- package/dist/components/Button/FloatDoubleButton/index.cjs.js +1 -1
- package/dist/components/Button/FloatDoubleButton/index.es.js +1 -1
- package/dist/components/Button/FloatSingleButton/index.cjs.js +1 -1
- package/dist/components/Button/FloatSingleButton/index.es.js +1 -1
- package/dist/components/Button/SingleButton/index.cjs.js +1 -1
- package/dist/components/Button/SingleButton/index.es.js +1 -1
- package/dist/components/Button/index.cjs.js +1 -1
- package/dist/components/Button/index.es.js +1 -1
- package/dist/components/Chips/BasicChips/index.styled.cjs.js +1 -1
- package/dist/components/Chips/BasicChips/index.styled.es.js +1 -1
- package/dist/components/Chips/ChipItem/index.cjs.js +1 -1
- package/dist/components/Chips/ChipItem/index.es.js +21 -23
- package/dist/components/Chips/ChipItem/index.styled.cjs.js +1 -1
- package/dist/components/Chips/ChipItem/index.styled.es.js +19 -21
- package/dist/components/Chips/ChipsFrame/index.cjs.js +1 -1
- package/dist/components/Chips/ChipsFrame/index.es.js +10 -10
- package/dist/components/Chips/ChipsFrame/index.styled.cjs.js +1 -1
- package/dist/components/Chips/ChipsFrame/index.styled.es.js +1 -1
- package/dist/components/Control/CheckMark/index.cjs.js +1 -1
- package/dist/components/Control/CheckMark/index.es.js +16 -18
- package/dist/components/Control/RadioButton/index.cjs.js +1 -1
- package/dist/components/Control/RadioButton/index.es.js +1 -1
- package/dist/components/Control/RadioButton/index.styled.cjs.js +1 -1
- package/dist/components/Control/RadioButton/index.styled.es.js +16 -18
- package/dist/components/Control/Switch/index.cjs.js +1 -1
- package/dist/components/Control/Switch/index.d.ts +37 -9
- package/dist/components/Control/Switch/index.es.js +189 -84
- package/dist/components/Control/index.cjs.js +1 -1
- package/dist/components/Control/index.d.ts +2 -1
- package/dist/components/Control/index.es.js +4 -4
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/ActiveDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/ActiveDateOfMonth.es.js +18 -20
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/DisabledDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/DisabledDateOfMonth.es.js +18 -20
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/NoneDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/NoneDateOfMonth.es.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeEndFocusDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeEndFocusDateOfMonth.es.js +18 -20
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeStartFocusDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeStartFocusDateOfMonth.es.js +18 -20
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/SingleFocusDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/SingleFocusDateOfMonth.es.js +18 -20
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/index.styled.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/index.styled.es.js +27 -29
- package/dist/components/DatePicker/BaseDatePicker/DayOfWeek/index.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DayOfWeek/index.es.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DayOfWeek/index.styled.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DayOfWeek/index.styled.es.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/YearMonthController/index.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/YearMonthController/index.es.js +11 -11
- package/dist/components/DatePicker/BaseDatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/index.es.js +26 -28
- package/dist/components/DatePicker/RangeDatePickerModal/index.cjs.js +1 -1
- package/dist/components/DatePicker/RangeDatePickerModal/index.es.js +1 -1
- package/dist/components/DatePicker/SingleDatePickerModal/index.cjs.js +1 -1
- package/dist/components/DatePicker/SingleDatePickerModal/index.es.js +16 -18
- package/dist/components/Input/NumberInput/index.cjs.js +1 -1
- package/dist/components/Input/NumberInput/index.es.js +48 -50
- package/dist/components/Input/PostfixInput/index.util.cjs.js +1 -1
- package/dist/components/Input/PostfixInput/index.util.es.js +19 -21
- package/dist/components/Input/TextField/index.cjs.js +1 -1
- package/dist/components/Input/TextField/index.es.js +10 -10
- package/dist/components/Input/index.cjs.js +1 -1
- package/dist/components/Input/index.es.js +27 -29
- package/dist/components/{Modal → LegacyModal}/BaseModal/index.cjs.js +1 -1
- package/dist/components/{Modal → LegacyModal}/BaseModal/index.es.js +2 -2
- package/dist/components/LegacyModal/index.cjs.js +1 -0
- package/dist/components/LegacyModal/index.d.ts +31 -0
- package/dist/components/LegacyModal/index.es.js +9 -0
- package/dist/components/List/index.cjs.js +1 -1
- package/dist/components/List/index.es.js +8 -8
- package/dist/components/Loading/ProgressBar/index.cjs.js +1 -1
- package/dist/components/Loading/ProgressBar/index.es.js +1 -1
- package/dist/components/Loading/ProgressBar/index.styled.cjs.js +1 -1
- package/dist/components/Loading/ProgressBar/index.styled.es.js +17 -19
- package/dist/components/Loading/Spinner/index.cjs.js +1 -1
- package/dist/components/Loading/Spinner/index.es.js +1 -1
- package/dist/components/Loading/index.cjs.js +1 -1
- package/dist/components/Loading/index.es.js +1 -1
- package/dist/components/MiniButton/BoxMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/BoxMiniButton/index.es.js +4 -4
- package/dist/components/MiniButton/IconMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.d.ts +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.es.js +34 -31
- package/dist/components/MiniButton/UnderLineMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.d.ts +1 -0
- package/dist/components/MiniButton/UnderLineMiniButton/index.es.js +36 -31
- package/dist/components/MiniButton/common/index.styled.cjs.js +1 -1
- package/dist/components/MiniButton/common/index.styled.es.js +18 -20
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.d.ts +14 -27
- package/dist/components/Modal/index.es.js +99 -7
- package/dist/components/Navigation/BaseNavigation/index.cjs.js +1 -1
- package/dist/components/Navigation/BaseNavigation/index.es.js +9 -9
- package/dist/components/Navigation/BottomNavigationBar/index.cjs.js +1 -1
- package/dist/components/Navigation/BottomNavigationBar/index.es.js +5 -5
- package/dist/components/Navigation/PageNavigationBar/index.cjs.js +1 -1
- package/dist/components/Navigation/PageNavigationBar/index.es.js +10 -10
- package/dist/components/Navigation/TitleNavigationBar/index.cjs.js +1 -1
- package/dist/components/Navigation/TitleNavigationBar/index.es.js +10 -10
- package/dist/components/Navigation/index.cjs.js +1 -1
- package/dist/components/Navigation/index.es.js +10 -10
- package/dist/components/OverlayRoot/index.cjs.js +1 -1
- package/dist/components/OverlayRoot/index.es.js +16 -18
- package/dist/components/Segment/BaseSegment/index.styled.cjs.js +1 -1
- package/dist/components/Segment/BaseSegment/index.styled.es.js +1 -1
- package/dist/components/Segment/ExtendSegment/index.styled.cjs.js +1 -1
- package/dist/components/Segment/ExtendSegment/index.styled.es.js +1 -1
- package/dist/components/SelectBox/index.cjs.js +1 -1
- package/dist/components/SelectBox/index.es.js +14 -14
- package/dist/components/SelectBox/index.styled.cjs.js +1 -1
- package/dist/components/SelectBox/index.styled.es.js +23 -25
- package/dist/components/Tabs/FillTabs/index.cjs.js +1 -1
- package/dist/components/Tabs/FillTabs/index.es.js +18 -20
- package/dist/components/Tabs/TextTabs/index.cjs.js +1 -1
- package/dist/components/Tabs/TextTabs/index.d.ts +15 -11
- package/dist/components/Tabs/TextTabs/index.es.js +51 -64
- package/dist/components/Tabs/index.cjs.js +1 -1
- package/dist/components/Tabs/index.es.js +5 -4
- package/dist/components/Tag/index.cjs.js +1 -1
- package/dist/components/Tag/index.es.js +1 -1
- package/dist/components/Tag/index.styled.cjs.js +1 -1
- package/dist/components/Tag/index.styled.es.js +16 -18
- package/dist/components/Terms/index.cjs.js +1 -1
- package/dist/components/Terms/index.es.js +14 -15
- package/dist/components/TextArea/index.cjs.js +1 -0
- package/dist/components/TextArea/index.d.ts +80 -0
- package/dist/components/TextArea/index.es.js +30 -0
- package/dist/components/Title/index.cjs.js +1 -1
- package/dist/components/Title/index.es.js +1 -1
- package/dist/components/Title/index.styled.cjs.js +1 -1
- package/dist/components/Title/index.styled.es.js +20 -22
- package/dist/components/Toast/index.cjs.js +1 -0
- package/dist/components/Toast/index.d.ts +5 -0
- package/dist/components/Toast/index.es.js +36 -0
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +6 -3
- package/dist/components/index.es.js +154 -120
- package/dist/components/ui/bottomSheet.cjs.js +13 -13
- package/dist/components/ui/bottomSheet.es.js +76 -71
- package/dist/components/ui/button.cjs.js +1 -1
- package/dist/components/ui/button.es.js +4 -4
- package/dist/components/ui/checkbox.cjs.js +1 -0
- package/dist/components/ui/checkbox.d.ts +9 -0
- package/dist/components/ui/checkbox.es.js +445 -0
- package/dist/components/ui/dialog.cjs.js +1 -1
- package/dist/components/ui/dialog.es.js +30 -30
- package/dist/components/ui/drawer.cjs.js +1 -1
- package/dist/components/ui/drawer.es.js +2 -2
- package/dist/components/ui/impact-tooltip.cjs.js +1 -0
- package/dist/components/ui/impact-tooltip.d.ts +16 -0
- package/dist/components/ui/impact-tooltip.es.js +387 -0
- package/dist/components/ui/share-ui.cjs.js +1 -1
- package/dist/components/ui/share-ui.es.js +2 -2
- package/dist/components/ui/tooltip.cjs.js +1 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.es.js +392 -0
- package/dist/components/ui/typography.cjs.js +1 -1
- package/dist/components/ui/typography.es.js +3 -3
- package/dist/core/Colors/index.cjs.js +1 -1
- package/dist/core/Colors/index.d.ts +0 -4
- package/dist/core/Colors/index.es.js +4 -8
- package/dist/core/Display/Mobile.cjs.js +1 -1
- package/dist/core/Display/Mobile.es.js +1 -1
- package/dist/core/Display/Pc.cjs.js +1 -1
- package/dist/core/Display/Pc.es.js +1 -1
- package/dist/core/Display/index.styled.cjs.js +1 -1
- package/dist/core/Display/index.styled.es.js +17 -19
- package/dist/core/Typography/BaseTypography/index.cjs.js +1 -1
- package/dist/core/Typography/BaseTypography/index.es.js +2 -2
- package/dist/hooks/useLayoutIsMobile.cjs.js +1 -1
- package/dist/hooks/useLayoutIsMobile.es.js +17 -19
- package/dist/icons/src/aliases/aliases.cjs.js +1 -1
- package/dist/icons/src/aliases/aliases.d.ts +9 -9
- package/dist/icons/src/aliases/aliases.es.js +44 -44
- package/dist/icons/src/aliases/index.cjs.js +1 -1
- package/dist/icons/src/aliases/index.es.js +88 -88
- package/dist/icons/src/aliases/prefixed.cjs.js +1 -1
- package/dist/icons/src/aliases/prefixed.d.ts +11 -11
- package/dist/icons/src/aliases/prefixed.es.js +48 -48
- package/dist/icons/src/aliases/suffixed.cjs.js +1 -1
- package/dist/icons/src/aliases/suffixed.d.ts +16 -16
- package/dist/icons/src/aliases/suffixed.es.js +46 -46
- package/dist/icons/src/icons/index.cjs.js +1 -1
- package/dist/icons/src/icons/index.d.ts +11 -11
- package/dist/icons/src/icons/index.es.js +50 -50
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +379 -345
- package/dist/lib/utils.cjs.js +1 -1
- package/dist/lib/utils.es.js +2761 -2
- package/dist/library/BasicLayout/Footer.cjs.js +1 -1
- package/dist/library/BasicLayout/Footer.d.ts +2 -2
- package/dist/library/BasicLayout/Footer.es.js +35 -34
- package/dist/library/BasicLayout/index.cjs.js +1 -1
- package/dist/library/BasicLayout/index.d.ts +1 -1
- package/dist/library/BasicLayout/index.es.js +20 -22
- package/dist/library/BasicLayout/index.styled.cjs.js +1 -1
- package/dist/library/BasicLayout/index.styled.es.js +45 -47
- package/dist/library/Lottie/index.cjs.js +1 -1
- package/dist/library/Lottie/index.es.js +116 -116
- package/dist/utils/GenerateColorStyle/chip.cjs.js +1 -1
- package/dist/utils/GenerateColorStyle/chip.es.js +1 -1
- package/dist/utils/GenerateColorStyle/index.cjs.js +1 -1
- package/dist/utils/GenerateColorStyle/index.es.js +8 -8
- package/dist/utils/GenerateColorStyle/tab/fill-tabs.cjs.js +1 -1
- package/dist/utils/GenerateColorStyle/tab/fill-tabs.es.js +17 -19
- package/dist/utils/GenerateColorStyle/tab/text-tabs.cjs.js +1 -1
- package/dist/utils/GenerateColorStyle/tab/text-tabs.es.js +17 -19
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.es.js +8 -8
- package/package.json +22 -15
- package/dist/chunks/index.B0KRXeX3.js +0 -205
- package/dist/chunks/index.BiFBNKMb.js +0 -51
- package/dist/chunks/index.C4mr2-78.js +0 -1
- package/dist/chunks/index.CAOufkQO.js +0 -1072
- package/dist/chunks/index.Dazlhpef.js +0 -45
- package/dist/chunks/index.DnJQUgiG.js +0 -1
- package/dist/chunks/index.SS1p-Ys5.js +0 -1
- package/dist/chunks/index.styled.DX1B4OiV.js +0 -412
- package/dist/chunks/utils.B9KdtH6G.js +0 -2493
- package/dist/chunks/utils.Gb5_Gcy7.js +0 -1
- package/dist/components/Control/CheckBox/CheckIcon.cjs.js +0 -1
- package/dist/components/Control/CheckBox/CheckIcon.d.ts +0 -6
- package/dist/components/Control/CheckBox/CheckIcon.es.js +0 -26
- package/dist/components/Control/CheckBox/index.cjs.js +0 -1
- package/dist/components/Control/CheckBox/index.d.ts +0 -12
- package/dist/components/Control/CheckBox/index.es.js +0 -96
- package/dist/components/Control/CheckBox/index.styled.cjs.js +0 -24
- package/dist/components/Control/CheckBox/index.styled.d.ts +0 -18
- package/dist/components/Control/CheckBox/index.styled.es.js +0 -30
- package/dist/components/Control/Switch/index.styled.cjs.js +0 -32
- package/dist/components/Control/Switch/index.styled.d.ts +0 -15
- package/dist/components/Control/Switch/index.styled.es.js +0 -42
- package/dist/components/MiniButton/UnderLineMiniButton/index.styled.cjs.js +0 -8
- package/dist/components/MiniButton/UnderLineMiniButton/index.styled.d.ts +0 -9
- package/dist/components/MiniButton/UnderLineMiniButton/index.styled.es.js +0 -14
- package/dist/components/ToastMessage/BaseToastMessage/index.cjs.js +0 -1
- package/dist/components/ToastMessage/BaseToastMessage/index.d.ts +0 -13
- package/dist/components/ToastMessage/BaseToastMessage/index.es.js +0 -25
- package/dist/components/ToastMessage/BaseToastMessage/index.styled.cjs.js +0 -1
- package/dist/components/ToastMessage/BaseToastMessage/index.styled.d.ts +0 -10
- package/dist/components/ToastMessage/BaseToastMessage/index.styled.es.js +0 -80
- package/dist/components/ToastMessage/Toast/index.cjs.js +0 -1
- package/dist/components/ToastMessage/Toast/index.d.ts +0 -13
- package/dist/components/ToastMessage/Toast/index.es.js +0 -32
- package/dist/components/ToastMessage/Toast/index.styled.cjs.js +0 -13
- package/dist/components/ToastMessage/Toast/index.styled.d.ts +0 -8
- package/dist/components/ToastMessage/Toast/index.styled.es.js +0 -18
- package/dist/components/ToastMessage/index.cjs.js +0 -1
- package/dist/components/ToastMessage/index.d.ts +0 -1
- package/dist/components/ToastMessage/index.es.js +0 -4
- package/dist/components/Tooltip/BasicTooltip/index.cjs.js +0 -1
- package/dist/components/Tooltip/BasicTooltip/index.d.ts +0 -5
- package/dist/components/Tooltip/BasicTooltip/index.es.js +0 -6
- package/dist/components/Tooltip/ImpactTooltip/index.cjs.js +0 -1
- package/dist/components/Tooltip/ImpactTooltip/index.d.ts +0 -7
- package/dist/components/Tooltip/ImpactTooltip/index.es.js +0 -23
- package/dist/components/Tooltip/TooltipBase/index.cjs.js +0 -8
- package/dist/components/Tooltip/TooltipBase/index.d.ts +0 -18
- package/dist/components/Tooltip/TooltipBase/index.es.js +0 -146
- package/dist/components/Tooltip/TooltipBase/index.styled.cjs.js +0 -107
- package/dist/components/Tooltip/TooltipBase/index.styled.d.ts +0 -22
- package/dist/components/Tooltip/TooltipBase/index.styled.es.js +0 -2006
- package/dist/components/Tooltip/index.cjs.js +0 -1
- package/dist/components/Tooltip/index.d.ts +0 -6
- package/dist/components/Tooltip/index.es.js +0 -6
- /package/dist/components/{Modal → LegacyModal}/BaseModal/index.d.ts +0 -0
- /package/dist/components/{Modal → LegacyModal}/BaseModal/index.styled.cjs.js +0 -0
- /package/dist/components/{Modal → LegacyModal}/BaseModal/index.styled.d.ts +0 -0
- /package/dist/components/{Modal → LegacyModal}/BaseModal/index.styled.es.js +0 -0
- /package/dist/components/{Modal → LegacyModal}/index.styled.cjs.js +0 -0
- /package/dist/components/{Modal → LegacyModal}/index.styled.d.ts +0 -0
- /package/dist/components/{Modal → LegacyModal}/index.styled.es.js +0 -0
|
@@ -0,0 +1,777 @@
|
|
|
1
|
+
import * as gt from "react";
|
|
2
|
+
import a from "react";
|
|
3
|
+
import Wt from "react-dom";
|
|
4
|
+
var Xt = (n, o, e, s, N, d, p, S) => {
|
|
5
|
+
let f = document.documentElement, i = ["light", "dark"];
|
|
6
|
+
function y(g) {
|
|
7
|
+
(Array.isArray(n) ? n : [n]).forEach((v) => {
|
|
8
|
+
let W = v === "class", P = W && d ? N.map((c) => d[c] || c) : N;
|
|
9
|
+
W ? (f.classList.remove(...P), f.classList.add(d && d[g] ? d[g] : g)) : f.setAttribute(v, g);
|
|
10
|
+
}), t(g);
|
|
11
|
+
}
|
|
12
|
+
function t(g) {
|
|
13
|
+
S && i.includes(g) && (f.style.colorScheme = g);
|
|
14
|
+
}
|
|
15
|
+
function x() {
|
|
16
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
17
|
+
}
|
|
18
|
+
if (s) y(s);
|
|
19
|
+
else try {
|
|
20
|
+
let g = localStorage.getItem(o) || e, v = p && g === "system" ? x() : g;
|
|
21
|
+
y(v);
|
|
22
|
+
} catch {
|
|
23
|
+
}
|
|
24
|
+
}, Kt = gt.createContext(void 0), qt = { setTheme: (n) => {
|
|
25
|
+
}, themes: [] }, ke = () => {
|
|
26
|
+
var n;
|
|
27
|
+
return (n = gt.useContext(Kt)) != null ? n : qt;
|
|
28
|
+
};
|
|
29
|
+
gt.memo(({ forcedTheme: n, storageKey: o, attribute: e, enableSystem: s, enableColorScheme: N, defaultTheme: d, value: p, themes: S, nonce: f, scriptProps: i }) => {
|
|
30
|
+
let y = JSON.stringify([e, o, d, n, S, p, s, N]).slice(1, -1);
|
|
31
|
+
return gt.createElement("script", { ...i, suppressHydrationWarning: !0, nonce: typeof window > "u" ? f : "", dangerouslySetInnerHTML: { __html: `(${Xt.toString()})(${y})` } });
|
|
32
|
+
});
|
|
33
|
+
function Gt(n) {
|
|
34
|
+
if (typeof document > "u") return;
|
|
35
|
+
let o = document.head || document.getElementsByTagName("head")[0], e = document.createElement("style");
|
|
36
|
+
e.type = "text/css", o.appendChild(e), e.styleSheet ? e.styleSheet.cssText = n : e.appendChild(document.createTextNode(n));
|
|
37
|
+
}
|
|
38
|
+
const Jt = (n) => {
|
|
39
|
+
switch (n) {
|
|
40
|
+
case "success":
|
|
41
|
+
return te;
|
|
42
|
+
case "info":
|
|
43
|
+
return ae;
|
|
44
|
+
case "warning":
|
|
45
|
+
return ee;
|
|
46
|
+
case "error":
|
|
47
|
+
return oe;
|
|
48
|
+
default:
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}, Qt = Array(12).fill(0), Zt = ({ visible: n, className: o }) => /* @__PURE__ */ a.createElement("div", {
|
|
52
|
+
className: [
|
|
53
|
+
"sonner-loading-wrapper",
|
|
54
|
+
o
|
|
55
|
+
].filter(Boolean).join(" "),
|
|
56
|
+
"data-visible": n
|
|
57
|
+
}, /* @__PURE__ */ a.createElement("div", {
|
|
58
|
+
className: "sonner-spinner"
|
|
59
|
+
}, Qt.map((e, s) => /* @__PURE__ */ a.createElement("div", {
|
|
60
|
+
className: "sonner-loading-bar",
|
|
61
|
+
key: `spinner-bar-${s}`
|
|
62
|
+
})))), te = /* @__PURE__ */ a.createElement("svg", {
|
|
63
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
64
|
+
viewBox: "0 0 20 20",
|
|
65
|
+
fill: "currentColor",
|
|
66
|
+
height: "20",
|
|
67
|
+
width: "20"
|
|
68
|
+
}, /* @__PURE__ */ a.createElement("path", {
|
|
69
|
+
fillRule: "evenodd",
|
|
70
|
+
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",
|
|
71
|
+
clipRule: "evenodd"
|
|
72
|
+
})), ee = /* @__PURE__ */ a.createElement("svg", {
|
|
73
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
74
|
+
viewBox: "0 0 24 24",
|
|
75
|
+
fill: "currentColor",
|
|
76
|
+
height: "20",
|
|
77
|
+
width: "20"
|
|
78
|
+
}, /* @__PURE__ */ a.createElement("path", {
|
|
79
|
+
fillRule: "evenodd",
|
|
80
|
+
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",
|
|
81
|
+
clipRule: "evenodd"
|
|
82
|
+
})), ae = /* @__PURE__ */ a.createElement("svg", {
|
|
83
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
84
|
+
viewBox: "0 0 20 20",
|
|
85
|
+
fill: "currentColor",
|
|
86
|
+
height: "20",
|
|
87
|
+
width: "20"
|
|
88
|
+
}, /* @__PURE__ */ a.createElement("path", {
|
|
89
|
+
fillRule: "evenodd",
|
|
90
|
+
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",
|
|
91
|
+
clipRule: "evenodd"
|
|
92
|
+
})), oe = /* @__PURE__ */ a.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__ */ a.createElement("path", {
|
|
99
|
+
fillRule: "evenodd",
|
|
100
|
+
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",
|
|
101
|
+
clipRule: "evenodd"
|
|
102
|
+
})), se = /* @__PURE__ */ a.createElement("svg", {
|
|
103
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
104
|
+
width: "12",
|
|
105
|
+
height: "12",
|
|
106
|
+
viewBox: "0 0 24 24",
|
|
107
|
+
fill: "none",
|
|
108
|
+
stroke: "currentColor",
|
|
109
|
+
strokeWidth: "1.5",
|
|
110
|
+
strokeLinecap: "round",
|
|
111
|
+
strokeLinejoin: "round"
|
|
112
|
+
}, /* @__PURE__ */ a.createElement("line", {
|
|
113
|
+
x1: "18",
|
|
114
|
+
y1: "6",
|
|
115
|
+
x2: "6",
|
|
116
|
+
y2: "18"
|
|
117
|
+
}), /* @__PURE__ */ a.createElement("line", {
|
|
118
|
+
x1: "6",
|
|
119
|
+
y1: "6",
|
|
120
|
+
x2: "18",
|
|
121
|
+
y2: "18"
|
|
122
|
+
})), ne = () => {
|
|
123
|
+
const [n, o] = a.useState(document.hidden);
|
|
124
|
+
return a.useEffect(() => {
|
|
125
|
+
const e = () => {
|
|
126
|
+
o(document.hidden);
|
|
127
|
+
};
|
|
128
|
+
return document.addEventListener("visibilitychange", e), () => window.removeEventListener("visibilitychange", e);
|
|
129
|
+
}, []), n;
|
|
130
|
+
};
|
|
131
|
+
let Et = 1;
|
|
132
|
+
class re {
|
|
133
|
+
constructor() {
|
|
134
|
+
this.subscribe = (o) => (this.subscribers.push(o), () => {
|
|
135
|
+
const e = this.subscribers.indexOf(o);
|
|
136
|
+
this.subscribers.splice(e, 1);
|
|
137
|
+
}), this.publish = (o) => {
|
|
138
|
+
this.subscribers.forEach((e) => e(o));
|
|
139
|
+
}, this.addToast = (o) => {
|
|
140
|
+
this.publish(o), this.toasts = [
|
|
141
|
+
...this.toasts,
|
|
142
|
+
o
|
|
143
|
+
];
|
|
144
|
+
}, this.create = (o) => {
|
|
145
|
+
var e;
|
|
146
|
+
const { message: s, ...N } = o, d = typeof (o == null ? void 0 : o.id) == "number" || ((e = o.id) == null ? void 0 : e.length) > 0 ? o.id : Et++, p = this.toasts.find((f) => f.id === d), S = o.dismissible === void 0 ? !0 : o.dismissible;
|
|
147
|
+
return this.dismissedToasts.has(d) && this.dismissedToasts.delete(d), p ? this.toasts = this.toasts.map((f) => f.id === d ? (this.publish({
|
|
148
|
+
...f,
|
|
149
|
+
...o,
|
|
150
|
+
id: d,
|
|
151
|
+
title: s
|
|
152
|
+
}), {
|
|
153
|
+
...f,
|
|
154
|
+
...o,
|
|
155
|
+
id: d,
|
|
156
|
+
dismissible: S,
|
|
157
|
+
title: s
|
|
158
|
+
}) : f) : this.addToast({
|
|
159
|
+
title: s,
|
|
160
|
+
...N,
|
|
161
|
+
dismissible: S,
|
|
162
|
+
id: d
|
|
163
|
+
}), d;
|
|
164
|
+
}, this.dismiss = (o) => (o ? (this.dismissedToasts.add(o), requestAnimationFrame(() => this.subscribers.forEach((e) => e({
|
|
165
|
+
id: o,
|
|
166
|
+
dismiss: !0
|
|
167
|
+
})))) : this.toasts.forEach((e) => {
|
|
168
|
+
this.subscribers.forEach((s) => s({
|
|
169
|
+
id: e.id,
|
|
170
|
+
dismiss: !0
|
|
171
|
+
}));
|
|
172
|
+
}), o), this.message = (o, e) => this.create({
|
|
173
|
+
...e,
|
|
174
|
+
message: o
|
|
175
|
+
}), this.error = (o, e) => this.create({
|
|
176
|
+
...e,
|
|
177
|
+
message: o,
|
|
178
|
+
type: "error"
|
|
179
|
+
}), this.success = (o, e) => this.create({
|
|
180
|
+
...e,
|
|
181
|
+
type: "success",
|
|
182
|
+
message: o
|
|
183
|
+
}), this.info = (o, e) => this.create({
|
|
184
|
+
...e,
|
|
185
|
+
type: "info",
|
|
186
|
+
message: o
|
|
187
|
+
}), this.warning = (o, e) => this.create({
|
|
188
|
+
...e,
|
|
189
|
+
type: "warning",
|
|
190
|
+
message: o
|
|
191
|
+
}), this.loading = (o, e) => this.create({
|
|
192
|
+
...e,
|
|
193
|
+
type: "loading",
|
|
194
|
+
message: o
|
|
195
|
+
}), this.promise = (o, e) => {
|
|
196
|
+
if (!e)
|
|
197
|
+
return;
|
|
198
|
+
let s;
|
|
199
|
+
e.loading !== void 0 && (s = this.create({
|
|
200
|
+
...e,
|
|
201
|
+
promise: o,
|
|
202
|
+
type: "loading",
|
|
203
|
+
message: e.loading,
|
|
204
|
+
description: typeof e.description != "function" ? e.description : void 0
|
|
205
|
+
}));
|
|
206
|
+
const N = Promise.resolve(o instanceof Function ? o() : o);
|
|
207
|
+
let d = s !== void 0, p;
|
|
208
|
+
const S = N.then(async (i) => {
|
|
209
|
+
if (p = [
|
|
210
|
+
"resolve",
|
|
211
|
+
i
|
|
212
|
+
], a.isValidElement(i))
|
|
213
|
+
d = !1, this.create({
|
|
214
|
+
id: s,
|
|
215
|
+
type: "default",
|
|
216
|
+
message: i
|
|
217
|
+
});
|
|
218
|
+
else if (le(i) && !i.ok) {
|
|
219
|
+
d = !1;
|
|
220
|
+
const t = typeof e.error == "function" ? await e.error(`HTTP error! status: ${i.status}`) : e.error, x = typeof e.description == "function" ? await e.description(`HTTP error! status: ${i.status}`) : e.description, v = typeof t == "object" && !a.isValidElement(t) ? t : {
|
|
221
|
+
message: t
|
|
222
|
+
};
|
|
223
|
+
this.create({
|
|
224
|
+
id: s,
|
|
225
|
+
type: "error",
|
|
226
|
+
description: x,
|
|
227
|
+
...v
|
|
228
|
+
});
|
|
229
|
+
} else if (i instanceof Error) {
|
|
230
|
+
d = !1;
|
|
231
|
+
const t = typeof e.error == "function" ? await e.error(i) : e.error, x = typeof e.description == "function" ? await e.description(i) : e.description, v = typeof t == "object" && !a.isValidElement(t) ? t : {
|
|
232
|
+
message: t
|
|
233
|
+
};
|
|
234
|
+
this.create({
|
|
235
|
+
id: s,
|
|
236
|
+
type: "error",
|
|
237
|
+
description: x,
|
|
238
|
+
...v
|
|
239
|
+
});
|
|
240
|
+
} else if (e.success !== void 0) {
|
|
241
|
+
d = !1;
|
|
242
|
+
const t = typeof e.success == "function" ? await e.success(i) : e.success, x = typeof e.description == "function" ? await e.description(i) : e.description, v = typeof t == "object" && !a.isValidElement(t) ? t : {
|
|
243
|
+
message: t
|
|
244
|
+
};
|
|
245
|
+
this.create({
|
|
246
|
+
id: s,
|
|
247
|
+
type: "success",
|
|
248
|
+
description: x,
|
|
249
|
+
...v
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
}).catch(async (i) => {
|
|
253
|
+
if (p = [
|
|
254
|
+
"reject",
|
|
255
|
+
i
|
|
256
|
+
], e.error !== void 0) {
|
|
257
|
+
d = !1;
|
|
258
|
+
const y = typeof e.error == "function" ? await e.error(i) : e.error, t = typeof e.description == "function" ? await e.description(i) : e.description, g = typeof y == "object" && !a.isValidElement(y) ? y : {
|
|
259
|
+
message: y
|
|
260
|
+
};
|
|
261
|
+
this.create({
|
|
262
|
+
id: s,
|
|
263
|
+
type: "error",
|
|
264
|
+
description: t,
|
|
265
|
+
...g
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}).finally(() => {
|
|
269
|
+
d && (this.dismiss(s), s = void 0), e.finally == null || e.finally.call(e);
|
|
270
|
+
}), f = () => new Promise((i, y) => S.then(() => p[0] === "reject" ? y(p[1]) : i(p[1])).catch(y));
|
|
271
|
+
return typeof s != "string" && typeof s != "number" ? {
|
|
272
|
+
unwrap: f
|
|
273
|
+
} : Object.assign(s, {
|
|
274
|
+
unwrap: f
|
|
275
|
+
});
|
|
276
|
+
}, this.custom = (o, e) => {
|
|
277
|
+
const s = (e == null ? void 0 : e.id) || Et++;
|
|
278
|
+
return this.create({
|
|
279
|
+
jsx: o(s),
|
|
280
|
+
id: s,
|
|
281
|
+
...e
|
|
282
|
+
}), s;
|
|
283
|
+
}, this.getActiveToasts = () => this.toasts.filter((o) => !this.dismissedToasts.has(o.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
const _ = new re(), ie = (n, o) => {
|
|
287
|
+
const e = (o == null ? void 0 : o.id) || Et++;
|
|
288
|
+
return _.addToast({
|
|
289
|
+
title: n,
|
|
290
|
+
...o,
|
|
291
|
+
id: e
|
|
292
|
+
}), e;
|
|
293
|
+
}, le = (n) => n && typeof n == "object" && "ok" in n && typeof n.ok == "boolean" && "status" in n && typeof n.status == "number", de = ie, ce = () => _.toasts, ue = () => _.getActiveToasts(), Ne = Object.assign(de, {
|
|
294
|
+
success: _.success,
|
|
295
|
+
info: _.info,
|
|
296
|
+
warning: _.warning,
|
|
297
|
+
error: _.error,
|
|
298
|
+
custom: _.custom,
|
|
299
|
+
message: _.message,
|
|
300
|
+
promise: _.promise,
|
|
301
|
+
dismiss: _.dismiss,
|
|
302
|
+
loading: _.loading
|
|
303
|
+
}, {
|
|
304
|
+
getHistory: ce,
|
|
305
|
+
getToasts: ue
|
|
306
|
+
});
|
|
307
|
+
Gt("[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%)}");
|
|
308
|
+
function pt(n) {
|
|
309
|
+
return n.label !== void 0;
|
|
310
|
+
}
|
|
311
|
+
const fe = 3, me = "24px", pe = "16px", It = 4e3, ge = 356, he = 14, be = 45, ve = 200;
|
|
312
|
+
function O(...n) {
|
|
313
|
+
return n.filter(Boolean).join(" ");
|
|
314
|
+
}
|
|
315
|
+
function ye(n) {
|
|
316
|
+
const [o, e] = n.split("-"), s = [];
|
|
317
|
+
return o && s.push(o), e && s.push(e), s;
|
|
318
|
+
}
|
|
319
|
+
const we = (n) => {
|
|
320
|
+
var o, e, s, N, d, p, S, f, i;
|
|
321
|
+
const { invert: y, toast: t, unstyled: x, interacting: g, setHeights: v, visibleToasts: W, heights: P, index: c, toasts: st, expanded: X, removeToast: nt, defaultRichColors: ht, closeButton: z, style: tt, cancelButtonStyle: $, actionButtonStyle: bt, className: rt = "", descriptionClassName: vt = "", duration: et, position: H, gap: it, expandByDefault: at, classNames: u, icons: E, closeButtonAriaLabel: j = "Close toast" } = n, [F, I] = a.useState(null), [V, lt] = a.useState(null), [l, b] = a.useState(!1), [h, B] = a.useState(!1), [K, m] = a.useState(!1), [q, dt] = a.useState(!1), [ct, G] = a.useState(!1), [At, yt] = a.useState(0), [Ht, Tt] = a.useState(0), ot = a.useRef(t.duration || et || It), St = a.useRef(null), L = a.useRef(null), Ot = c === 0, zt = c + 1 <= W, R = t.type, J = t.dismissible !== !1, Lt = t.className || "", Pt = t.descriptionClassName || "", ut = a.useMemo(() => P.findIndex((r) => r.toastId === t.id) || 0, [
|
|
322
|
+
P,
|
|
323
|
+
t.id
|
|
324
|
+
]), jt = a.useMemo(() => {
|
|
325
|
+
var r;
|
|
326
|
+
return (r = t.closeButton) != null ? r : z;
|
|
327
|
+
}, [
|
|
328
|
+
t.closeButton,
|
|
329
|
+
z
|
|
330
|
+
]), kt = a.useMemo(() => t.duration || et || It, [
|
|
331
|
+
t.duration,
|
|
332
|
+
et
|
|
333
|
+
]), wt = a.useRef(0), Q = a.useRef(0), Nt = a.useRef(0), Z = a.useRef(null), [Yt, $t] = H.split("-"), _t = a.useMemo(() => P.reduce((r, w, k) => k >= ut ? r : r + w.height, 0), [
|
|
334
|
+
P,
|
|
335
|
+
ut
|
|
336
|
+
]), Rt = ne(), Ft = t.invert || y, xt = R === "loading";
|
|
337
|
+
Q.current = a.useMemo(() => ut * it + _t, [
|
|
338
|
+
ut,
|
|
339
|
+
_t
|
|
340
|
+
]), a.useEffect(() => {
|
|
341
|
+
ot.current = kt;
|
|
342
|
+
}, [
|
|
343
|
+
kt
|
|
344
|
+
]), a.useEffect(() => {
|
|
345
|
+
b(!0);
|
|
346
|
+
}, []), a.useEffect(() => {
|
|
347
|
+
const r = L.current;
|
|
348
|
+
if (r) {
|
|
349
|
+
const w = r.getBoundingClientRect().height;
|
|
350
|
+
return Tt(w), v((k) => [
|
|
351
|
+
{
|
|
352
|
+
toastId: t.id,
|
|
353
|
+
height: w,
|
|
354
|
+
position: t.position
|
|
355
|
+
},
|
|
356
|
+
...k
|
|
357
|
+
]), () => v((k) => k.filter((D) => D.toastId !== t.id));
|
|
358
|
+
}
|
|
359
|
+
}, [
|
|
360
|
+
v,
|
|
361
|
+
t.id
|
|
362
|
+
]), a.useLayoutEffect(() => {
|
|
363
|
+
if (!l) return;
|
|
364
|
+
const r = L.current, w = r.style.height;
|
|
365
|
+
r.style.height = "auto";
|
|
366
|
+
const k = r.getBoundingClientRect().height;
|
|
367
|
+
r.style.height = w, Tt(k), v((D) => D.find((T) => T.toastId === t.id) ? D.map((T) => T.toastId === t.id ? {
|
|
368
|
+
...T,
|
|
369
|
+
height: k
|
|
370
|
+
} : T) : [
|
|
371
|
+
{
|
|
372
|
+
toastId: t.id,
|
|
373
|
+
height: k,
|
|
374
|
+
position: t.position
|
|
375
|
+
},
|
|
376
|
+
...D
|
|
377
|
+
]);
|
|
378
|
+
}, [
|
|
379
|
+
l,
|
|
380
|
+
t.title,
|
|
381
|
+
t.description,
|
|
382
|
+
v,
|
|
383
|
+
t.id,
|
|
384
|
+
t.jsx,
|
|
385
|
+
t.action,
|
|
386
|
+
t.cancel
|
|
387
|
+
]);
|
|
388
|
+
const Y = a.useCallback(() => {
|
|
389
|
+
B(!0), yt(Q.current), v((r) => r.filter((w) => w.toastId !== t.id)), setTimeout(() => {
|
|
390
|
+
nt(t);
|
|
391
|
+
}, ve);
|
|
392
|
+
}, [
|
|
393
|
+
t,
|
|
394
|
+
nt,
|
|
395
|
+
v,
|
|
396
|
+
Q
|
|
397
|
+
]);
|
|
398
|
+
a.useEffect(() => {
|
|
399
|
+
if (t.promise && R === "loading" || t.duration === 1 / 0 || t.type === "loading") return;
|
|
400
|
+
let r;
|
|
401
|
+
return X || g || Rt ? (() => {
|
|
402
|
+
if (Nt.current < wt.current) {
|
|
403
|
+
const D = (/* @__PURE__ */ new Date()).getTime() - wt.current;
|
|
404
|
+
ot.current = ot.current - D;
|
|
405
|
+
}
|
|
406
|
+
Nt.current = (/* @__PURE__ */ new Date()).getTime();
|
|
407
|
+
})() : (() => {
|
|
408
|
+
ot.current !== 1 / 0 && (wt.current = (/* @__PURE__ */ new Date()).getTime(), r = setTimeout(() => {
|
|
409
|
+
t.onAutoClose == null || t.onAutoClose.call(t, t), Y();
|
|
410
|
+
}, ot.current));
|
|
411
|
+
})(), () => clearTimeout(r);
|
|
412
|
+
}, [
|
|
413
|
+
X,
|
|
414
|
+
g,
|
|
415
|
+
t,
|
|
416
|
+
R,
|
|
417
|
+
Rt,
|
|
418
|
+
Y
|
|
419
|
+
]), a.useEffect(() => {
|
|
420
|
+
t.delete && (Y(), t.onDismiss == null || t.onDismiss.call(t, t));
|
|
421
|
+
}, [
|
|
422
|
+
Y,
|
|
423
|
+
t.delete
|
|
424
|
+
]);
|
|
425
|
+
function Vt() {
|
|
426
|
+
var r;
|
|
427
|
+
if (E != null && E.loading) {
|
|
428
|
+
var w;
|
|
429
|
+
return /* @__PURE__ */ a.createElement("div", {
|
|
430
|
+
className: O(u == null ? void 0 : u.loader, t == null || (w = t.classNames) == null ? void 0 : w.loader, "sonner-loader"),
|
|
431
|
+
"data-visible": R === "loading"
|
|
432
|
+
}, E.loading);
|
|
433
|
+
}
|
|
434
|
+
return /* @__PURE__ */ a.createElement(Zt, {
|
|
435
|
+
className: O(u == null ? void 0 : u.loader, t == null || (r = t.classNames) == null ? void 0 : r.loader),
|
|
436
|
+
visible: R === "loading"
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
const Ut = t.icon || (E == null ? void 0 : E[R]) || Jt(R);
|
|
440
|
+
var Dt, Bt;
|
|
441
|
+
return /* @__PURE__ */ a.createElement("li", {
|
|
442
|
+
tabIndex: 0,
|
|
443
|
+
ref: L,
|
|
444
|
+
className: O(rt, Lt, u == null ? void 0 : u.toast, t == null || (o = t.classNames) == null ? void 0 : o.toast, u == null ? void 0 : u.default, u == null ? void 0 : u[R], t == null || (e = t.classNames) == null ? void 0 : e[R]),
|
|
445
|
+
"data-sonner-toast": "",
|
|
446
|
+
"data-rich-colors": (Dt = t.richColors) != null ? Dt : ht,
|
|
447
|
+
"data-styled": !(t.jsx || t.unstyled || x),
|
|
448
|
+
"data-mounted": l,
|
|
449
|
+
"data-promise": !!t.promise,
|
|
450
|
+
"data-swiped": ct,
|
|
451
|
+
"data-removed": h,
|
|
452
|
+
"data-visible": zt,
|
|
453
|
+
"data-y-position": Yt,
|
|
454
|
+
"data-x-position": $t,
|
|
455
|
+
"data-index": c,
|
|
456
|
+
"data-front": Ot,
|
|
457
|
+
"data-swiping": K,
|
|
458
|
+
"data-dismissible": J,
|
|
459
|
+
"data-type": R,
|
|
460
|
+
"data-invert": Ft,
|
|
461
|
+
"data-swipe-out": q,
|
|
462
|
+
"data-swipe-direction": V,
|
|
463
|
+
"data-expanded": !!(X || at && l),
|
|
464
|
+
"data-testid": t.testId,
|
|
465
|
+
style: {
|
|
466
|
+
"--index": c,
|
|
467
|
+
"--toasts-before": c,
|
|
468
|
+
"--z-index": st.length - c,
|
|
469
|
+
"--offset": `${h ? At : Q.current}px`,
|
|
470
|
+
"--initial-height": at ? "auto" : `${Ht}px`,
|
|
471
|
+
...tt,
|
|
472
|
+
...t.style
|
|
473
|
+
},
|
|
474
|
+
onDragEnd: () => {
|
|
475
|
+
m(!1), I(null), Z.current = null;
|
|
476
|
+
},
|
|
477
|
+
onPointerDown: (r) => {
|
|
478
|
+
r.button !== 2 && (xt || !J || (St.current = /* @__PURE__ */ new Date(), yt(Q.current), r.target.setPointerCapture(r.pointerId), r.target.tagName !== "BUTTON" && (m(!0), Z.current = {
|
|
479
|
+
x: r.clientX,
|
|
480
|
+
y: r.clientY
|
|
481
|
+
})));
|
|
482
|
+
},
|
|
483
|
+
onPointerUp: () => {
|
|
484
|
+
var r, w, k;
|
|
485
|
+
if (q || !J) return;
|
|
486
|
+
Z.current = null;
|
|
487
|
+
const D = Number(((r = L.current) == null ? void 0 : r.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), ft = Number(((w = L.current) == null ? void 0 : w.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), T = (/* @__PURE__ */ new Date()).getTime() - ((k = St.current) == null ? void 0 : k.getTime()), M = F === "x" ? D : ft, mt = Math.abs(M) / T;
|
|
488
|
+
if (Math.abs(M) >= be || mt > 0.11) {
|
|
489
|
+
yt(Q.current), t.onDismiss == null || t.onDismiss.call(t, t), lt(F === "x" ? D > 0 ? "right" : "left" : ft > 0 ? "down" : "up"), Y(), dt(!0);
|
|
490
|
+
return;
|
|
491
|
+
} else {
|
|
492
|
+
var C, A;
|
|
493
|
+
(C = L.current) == null || C.style.setProperty("--swipe-amount-x", "0px"), (A = L.current) == null || A.style.setProperty("--swipe-amount-y", "0px");
|
|
494
|
+
}
|
|
495
|
+
G(!1), m(!1), I(null);
|
|
496
|
+
},
|
|
497
|
+
onPointerMove: (r) => {
|
|
498
|
+
var w, k, D;
|
|
499
|
+
if (!Z.current || !J || ((w = window.getSelection()) == null ? void 0 : w.toString().length) > 0) return;
|
|
500
|
+
const T = r.clientY - Z.current.y, M = r.clientX - Z.current.x;
|
|
501
|
+
var mt;
|
|
502
|
+
const C = (mt = n.swipeDirections) != null ? mt : ye(H);
|
|
503
|
+
!F && (Math.abs(M) > 1 || Math.abs(T) > 1) && I(Math.abs(M) > Math.abs(T) ? "x" : "y");
|
|
504
|
+
let A = {
|
|
505
|
+
x: 0,
|
|
506
|
+
y: 0
|
|
507
|
+
};
|
|
508
|
+
const Mt = (U) => 1 / (1.5 + Math.abs(U) / 20);
|
|
509
|
+
if (F === "y") {
|
|
510
|
+
if (C.includes("top") || C.includes("bottom"))
|
|
511
|
+
if (C.includes("top") && T < 0 || C.includes("bottom") && T > 0)
|
|
512
|
+
A.y = T;
|
|
513
|
+
else {
|
|
514
|
+
const U = T * Mt(T);
|
|
515
|
+
A.y = Math.abs(U) < Math.abs(T) ? U : T;
|
|
516
|
+
}
|
|
517
|
+
} else if (F === "x" && (C.includes("left") || C.includes("right")))
|
|
518
|
+
if (C.includes("left") && M < 0 || C.includes("right") && M > 0)
|
|
519
|
+
A.x = M;
|
|
520
|
+
else {
|
|
521
|
+
const U = M * Mt(M);
|
|
522
|
+
A.x = Math.abs(U) < Math.abs(M) ? U : M;
|
|
523
|
+
}
|
|
524
|
+
(Math.abs(A.x) > 0 || Math.abs(A.y) > 0) && G(!0), (k = L.current) == null || k.style.setProperty("--swipe-amount-x", `${A.x}px`), (D = L.current) == null || D.style.setProperty("--swipe-amount-y", `${A.y}px`);
|
|
525
|
+
}
|
|
526
|
+
}, jt && !t.jsx && R !== "loading" ? /* @__PURE__ */ a.createElement("button", {
|
|
527
|
+
"aria-label": j,
|
|
528
|
+
"data-disabled": xt,
|
|
529
|
+
"data-close-button": !0,
|
|
530
|
+
onClick: xt || !J ? () => {
|
|
531
|
+
} : () => {
|
|
532
|
+
Y(), t.onDismiss == null || t.onDismiss.call(t, t);
|
|
533
|
+
},
|
|
534
|
+
className: O(u == null ? void 0 : u.closeButton, t == null || (s = t.classNames) == null ? void 0 : s.closeButton)
|
|
535
|
+
}, (Bt = E == null ? void 0 : E.close) != null ? Bt : se) : null, (R || t.icon || t.promise) && t.icon !== null && ((E == null ? void 0 : E[R]) !== null || t.icon) ? /* @__PURE__ */ a.createElement("div", {
|
|
536
|
+
"data-icon": "",
|
|
537
|
+
className: O(u == null ? void 0 : u.icon, t == null || (N = t.classNames) == null ? void 0 : N.icon)
|
|
538
|
+
}, t.promise || t.type === "loading" && !t.icon ? t.icon || Vt() : null, t.type !== "loading" ? Ut : null) : null, /* @__PURE__ */ a.createElement("div", {
|
|
539
|
+
"data-content": "",
|
|
540
|
+
className: O(u == null ? void 0 : u.content, t == null || (d = t.classNames) == null ? void 0 : d.content)
|
|
541
|
+
}, /* @__PURE__ */ a.createElement("div", {
|
|
542
|
+
"data-title": "",
|
|
543
|
+
className: O(u == null ? void 0 : u.title, t == null || (p = t.classNames) == null ? void 0 : p.title)
|
|
544
|
+
}, t.jsx ? t.jsx : typeof t.title == "function" ? t.title() : t.title), t.description ? /* @__PURE__ */ a.createElement("div", {
|
|
545
|
+
"data-description": "",
|
|
546
|
+
className: O(vt, Pt, u == null ? void 0 : u.description, t == null || (S = t.classNames) == null ? void 0 : S.description)
|
|
547
|
+
}, typeof t.description == "function" ? t.description() : t.description) : null), /* @__PURE__ */ a.isValidElement(t.cancel) ? t.cancel : t.cancel && pt(t.cancel) ? /* @__PURE__ */ a.createElement("button", {
|
|
548
|
+
"data-button": !0,
|
|
549
|
+
"data-cancel": !0,
|
|
550
|
+
style: t.cancelButtonStyle || $,
|
|
551
|
+
onClick: (r) => {
|
|
552
|
+
pt(t.cancel) && J && (t.cancel.onClick == null || t.cancel.onClick.call(t.cancel, r), Y());
|
|
553
|
+
},
|
|
554
|
+
className: O(u == null ? void 0 : u.cancelButton, t == null || (f = t.classNames) == null ? void 0 : f.cancelButton)
|
|
555
|
+
}, t.cancel.label) : null, /* @__PURE__ */ a.isValidElement(t.action) ? t.action : t.action && pt(t.action) ? /* @__PURE__ */ a.createElement("button", {
|
|
556
|
+
"data-button": !0,
|
|
557
|
+
"data-action": !0,
|
|
558
|
+
style: t.actionButtonStyle || bt,
|
|
559
|
+
onClick: (r) => {
|
|
560
|
+
pt(t.action) && (t.action.onClick == null || t.action.onClick.call(t.action, r), !r.defaultPrevented && Y());
|
|
561
|
+
},
|
|
562
|
+
className: O(u == null ? void 0 : u.actionButton, t == null || (i = t.classNames) == null ? void 0 : i.actionButton)
|
|
563
|
+
}, t.action.label) : null);
|
|
564
|
+
};
|
|
565
|
+
function Ct() {
|
|
566
|
+
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
567
|
+
const n = document.documentElement.getAttribute("dir");
|
|
568
|
+
return n === "auto" || !n ? window.getComputedStyle(document.documentElement).direction : n;
|
|
569
|
+
}
|
|
570
|
+
function xe(n, o) {
|
|
571
|
+
const e = {};
|
|
572
|
+
return [
|
|
573
|
+
n,
|
|
574
|
+
o
|
|
575
|
+
].forEach((s, N) => {
|
|
576
|
+
const d = N === 1, p = d ? "--mobile-offset" : "--offset", S = d ? pe : me;
|
|
577
|
+
function f(i) {
|
|
578
|
+
[
|
|
579
|
+
"top",
|
|
580
|
+
"right",
|
|
581
|
+
"bottom",
|
|
582
|
+
"left"
|
|
583
|
+
].forEach((y) => {
|
|
584
|
+
e[`${p}-${y}`] = typeof i == "number" ? `${i}px` : i;
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
typeof s == "number" || typeof s == "string" ? f(s) : typeof s == "object" ? [
|
|
588
|
+
"top",
|
|
589
|
+
"right",
|
|
590
|
+
"bottom",
|
|
591
|
+
"left"
|
|
592
|
+
].forEach((i) => {
|
|
593
|
+
s[i] === void 0 ? e[`${p}-${i}`] = S : e[`${p}-${i}`] = typeof s[i] == "number" ? `${s[i]}px` : s[i];
|
|
594
|
+
}) : f(S);
|
|
595
|
+
}), e;
|
|
596
|
+
}
|
|
597
|
+
const _e = /* @__PURE__ */ a.forwardRef(function(o, e) {
|
|
598
|
+
const { id: s, invert: N, position: d = "bottom-right", hotkey: p = [
|
|
599
|
+
"altKey",
|
|
600
|
+
"KeyT"
|
|
601
|
+
], expand: S, closeButton: f, className: i, offset: y, mobileOffset: t, theme: x = "light", richColors: g, duration: v, style: W, visibleToasts: P = fe, toastOptions: c, dir: st = Ct(), gap: X = he, icons: nt, containerAriaLabel: ht = "Notifications" } = o, [z, tt] = a.useState([]), $ = a.useMemo(() => s ? z.filter((l) => l.toasterId === s) : z.filter((l) => !l.toasterId), [
|
|
602
|
+
z,
|
|
603
|
+
s
|
|
604
|
+
]), bt = a.useMemo(() => Array.from(new Set([
|
|
605
|
+
d
|
|
606
|
+
].concat($.filter((l) => l.position).map((l) => l.position)))), [
|
|
607
|
+
$,
|
|
608
|
+
d
|
|
609
|
+
]), [rt, vt] = a.useState([]), [et, H] = a.useState(!1), [it, at] = a.useState(!1), [u, E] = a.useState(x !== "system" ? x : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), j = a.useRef(null), F = p.join("+").replace(/Key/g, "").replace(/Digit/g, ""), I = a.useRef(null), V = a.useRef(!1), lt = a.useCallback((l) => {
|
|
610
|
+
tt((b) => {
|
|
611
|
+
var h;
|
|
612
|
+
return (h = b.find((B) => B.id === l.id)) != null && h.delete || _.dismiss(l.id), b.filter(({ id: B }) => B !== l.id);
|
|
613
|
+
});
|
|
614
|
+
}, []);
|
|
615
|
+
return a.useEffect(() => _.subscribe((l) => {
|
|
616
|
+
if (l.dismiss) {
|
|
617
|
+
requestAnimationFrame(() => {
|
|
618
|
+
tt((b) => b.map((h) => h.id === l.id ? {
|
|
619
|
+
...h,
|
|
620
|
+
delete: !0
|
|
621
|
+
} : h));
|
|
622
|
+
});
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
setTimeout(() => {
|
|
626
|
+
Wt.flushSync(() => {
|
|
627
|
+
tt((b) => {
|
|
628
|
+
const h = b.findIndex((B) => B.id === l.id);
|
|
629
|
+
return h !== -1 ? [
|
|
630
|
+
...b.slice(0, h),
|
|
631
|
+
{
|
|
632
|
+
...b[h],
|
|
633
|
+
...l
|
|
634
|
+
},
|
|
635
|
+
...b.slice(h + 1)
|
|
636
|
+
] : [
|
|
637
|
+
l,
|
|
638
|
+
...b
|
|
639
|
+
];
|
|
640
|
+
});
|
|
641
|
+
});
|
|
642
|
+
});
|
|
643
|
+
}), [
|
|
644
|
+
z
|
|
645
|
+
]), a.useEffect(() => {
|
|
646
|
+
if (x !== "system") {
|
|
647
|
+
E(x);
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
if (x === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? E("dark") : E("light")), typeof window > "u") return;
|
|
651
|
+
const l = window.matchMedia("(prefers-color-scheme: dark)");
|
|
652
|
+
try {
|
|
653
|
+
l.addEventListener("change", ({ matches: b }) => {
|
|
654
|
+
E(b ? "dark" : "light");
|
|
655
|
+
});
|
|
656
|
+
} catch {
|
|
657
|
+
l.addListener(({ matches: h }) => {
|
|
658
|
+
try {
|
|
659
|
+
E(h ? "dark" : "light");
|
|
660
|
+
} catch (B) {
|
|
661
|
+
console.error(B);
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
}, [
|
|
666
|
+
x
|
|
667
|
+
]), a.useEffect(() => {
|
|
668
|
+
z.length <= 1 && H(!1);
|
|
669
|
+
}, [
|
|
670
|
+
z
|
|
671
|
+
]), a.useEffect(() => {
|
|
672
|
+
const l = (b) => {
|
|
673
|
+
var h;
|
|
674
|
+
if (p.every((m) => b[m] || b.code === m)) {
|
|
675
|
+
var K;
|
|
676
|
+
H(!0), (K = j.current) == null || K.focus();
|
|
677
|
+
}
|
|
678
|
+
b.code === "Escape" && (document.activeElement === j.current || (h = j.current) != null && h.contains(document.activeElement)) && H(!1);
|
|
679
|
+
};
|
|
680
|
+
return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
|
|
681
|
+
}, [
|
|
682
|
+
p
|
|
683
|
+
]), a.useEffect(() => {
|
|
684
|
+
if (j.current)
|
|
685
|
+
return () => {
|
|
686
|
+
I.current && (I.current.focus({
|
|
687
|
+
preventScroll: !0
|
|
688
|
+
}), I.current = null, V.current = !1);
|
|
689
|
+
};
|
|
690
|
+
}, [
|
|
691
|
+
j.current
|
|
692
|
+
]), // Remove item from normal navigation flow, only available via hotkey
|
|
693
|
+
/* @__PURE__ */ a.createElement("section", {
|
|
694
|
+
ref: e,
|
|
695
|
+
"aria-label": `${ht} ${F}`,
|
|
696
|
+
tabIndex: -1,
|
|
697
|
+
"aria-live": "polite",
|
|
698
|
+
"aria-relevant": "additions text",
|
|
699
|
+
"aria-atomic": "false",
|
|
700
|
+
suppressHydrationWarning: !0
|
|
701
|
+
}, bt.map((l, b) => {
|
|
702
|
+
var h;
|
|
703
|
+
const [B, K] = l.split("-");
|
|
704
|
+
return $.length ? /* @__PURE__ */ a.createElement("ol", {
|
|
705
|
+
key: l,
|
|
706
|
+
dir: st === "auto" ? Ct() : st,
|
|
707
|
+
tabIndex: -1,
|
|
708
|
+
ref: j,
|
|
709
|
+
className: i,
|
|
710
|
+
"data-sonner-toaster": !0,
|
|
711
|
+
"data-sonner-theme": u,
|
|
712
|
+
"data-y-position": B,
|
|
713
|
+
"data-x-position": K,
|
|
714
|
+
style: {
|
|
715
|
+
"--front-toast-height": `${((h = rt[0]) == null ? void 0 : h.height) || 0}px`,
|
|
716
|
+
"--width": `${ge}px`,
|
|
717
|
+
"--gap": `${X}px`,
|
|
718
|
+
...W,
|
|
719
|
+
...xe(y, t)
|
|
720
|
+
},
|
|
721
|
+
onBlur: (m) => {
|
|
722
|
+
V.current && !m.currentTarget.contains(m.relatedTarget) && (V.current = !1, I.current && (I.current.focus({
|
|
723
|
+
preventScroll: !0
|
|
724
|
+
}), I.current = null));
|
|
725
|
+
},
|
|
726
|
+
onFocus: (m) => {
|
|
727
|
+
m.target instanceof HTMLElement && m.target.dataset.dismissible === "false" || V.current || (V.current = !0, I.current = m.relatedTarget);
|
|
728
|
+
},
|
|
729
|
+
onMouseEnter: () => H(!0),
|
|
730
|
+
onMouseMove: () => H(!0),
|
|
731
|
+
onMouseLeave: () => {
|
|
732
|
+
it || H(!1);
|
|
733
|
+
},
|
|
734
|
+
onDragEnd: () => H(!1),
|
|
735
|
+
onPointerDown: (m) => {
|
|
736
|
+
m.target instanceof HTMLElement && m.target.dataset.dismissible === "false" || at(!0);
|
|
737
|
+
},
|
|
738
|
+
onPointerUp: () => at(!1)
|
|
739
|
+
}, $.filter((m) => !m.position && b === 0 || m.position === l).map((m, q) => {
|
|
740
|
+
var dt, ct;
|
|
741
|
+
return /* @__PURE__ */ a.createElement(we, {
|
|
742
|
+
key: m.id,
|
|
743
|
+
icons: nt,
|
|
744
|
+
index: q,
|
|
745
|
+
toast: m,
|
|
746
|
+
defaultRichColors: g,
|
|
747
|
+
duration: (dt = c == null ? void 0 : c.duration) != null ? dt : v,
|
|
748
|
+
className: c == null ? void 0 : c.className,
|
|
749
|
+
descriptionClassName: c == null ? void 0 : c.descriptionClassName,
|
|
750
|
+
invert: N,
|
|
751
|
+
visibleToasts: P,
|
|
752
|
+
closeButton: (ct = c == null ? void 0 : c.closeButton) != null ? ct : f,
|
|
753
|
+
interacting: it,
|
|
754
|
+
position: l,
|
|
755
|
+
style: c == null ? void 0 : c.style,
|
|
756
|
+
unstyled: c == null ? void 0 : c.unstyled,
|
|
757
|
+
classNames: c == null ? void 0 : c.classNames,
|
|
758
|
+
cancelButtonStyle: c == null ? void 0 : c.cancelButtonStyle,
|
|
759
|
+
actionButtonStyle: c == null ? void 0 : c.actionButtonStyle,
|
|
760
|
+
closeButtonAriaLabel: c == null ? void 0 : c.closeButtonAriaLabel,
|
|
761
|
+
removeToast: lt,
|
|
762
|
+
toasts: $.filter((G) => G.position == m.position),
|
|
763
|
+
heights: rt.filter((G) => G.position == m.position),
|
|
764
|
+
setHeights: vt,
|
|
765
|
+
expandByDefault: S,
|
|
766
|
+
gap: X,
|
|
767
|
+
expanded: et,
|
|
768
|
+
swipeDirections: o.swipeDirections
|
|
769
|
+
});
|
|
770
|
+
})) : null;
|
|
771
|
+
}));
|
|
772
|
+
});
|
|
773
|
+
export {
|
|
774
|
+
_e as T,
|
|
775
|
+
Ne as t,
|
|
776
|
+
ke as z
|
|
777
|
+
};
|