@pfct/purple 1.5.0-rc.5 → 1.5.0-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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.55uP5Llv.js +23 -0
- package/dist/chunks/index.BB3W3jfD.js +58 -0
- package/dist/chunks/index.BKH_IfIv.js +734 -0
- package/dist/chunks/{index.styled.Bc4yfmzB.js → index.BOGczv4f.js} +266 -328
- package/dist/chunks/index.BSjRagb_.js +5 -0
- package/dist/chunks/index.Bl_fYP4h.js +78 -0
- package/dist/chunks/index.C6gQFc3A.js +1 -0
- package/dist/chunks/index.CDFgfSC_.js +106 -0
- package/dist/chunks/index.COC-ih10.js +1 -0
- package/dist/chunks/index.CSxTWj2O.js +1 -0
- package/dist/chunks/index.C_vToOO_.js +1 -0
- package/dist/chunks/{index.LN3KW-I4.js → index.Cc-miKAT.js} +1 -1
- package/dist/chunks/index.Crigd7-N.js +354 -0
- package/dist/chunks/index.Cw8-3kaP.js +1 -0
- package/dist/chunks/index.Cwg-luV1.js +60 -0
- package/dist/chunks/index.D1sqxe4V.js +13 -0
- package/dist/chunks/index.D44slB7j.js +1 -0
- package/dist/chunks/index.DBTu0V6e.js +1658 -0
- package/dist/chunks/index.DC_I05Aq.js +1 -0
- package/dist/chunks/index.DMhXgOEz.js +1 -0
- package/dist/chunks/index.DoZ51x4G.js +41 -0
- package/dist/chunks/index.DuekHEmj.js +6 -0
- package/dist/chunks/index.IrMKAFqG.js +773 -0
- package/dist/chunks/index.ZuOrgs85.js +1 -0
- package/dist/chunks/index.dlWziLJm.js +1 -0
- package/dist/chunks/index.wFBaTsPC.js +537 -0
- package/dist/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.es.js +493 -342
- 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 +25 -27
- 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 +22 -24
- package/dist/components/Chips/ChipItem/index.styled.cjs.js +1 -1
- package/dist/components/Chips/ChipItem/index.styled.es.js +22 -24
- package/dist/components/Chips/ChipsFrame/index.cjs.js +1 -1
- package/dist/components/Chips/ChipsFrame/index.es.js +13 -13
- 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 +19 -21
- 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 +19 -21
- package/dist/components/Control/Switch/index.cjs.js +1 -1
- package/dist/components/Control/Switch/index.es.js +19 -21
- 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 +20 -22
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/DisabledDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/DisabledDateOfMonth.es.js +20 -22
- 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 +20 -22
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeStartFocusDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/RangeStartFocusDateOfMonth.es.js +20 -22
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/SingleFocusDateOfMonth.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/SingleFocusDateOfMonth.es.js +20 -22
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/index.styled.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/DateOfMonth/index.styled.es.js +30 -32
- 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 +14 -14
- package/dist/components/DatePicker/BaseDatePicker/index.cjs.js +1 -1
- package/dist/components/DatePicker/BaseDatePicker/index.es.js +29 -31
- 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 +18 -20
- package/dist/components/Input/NumberInput/index.cjs.js +1 -1
- package/dist/components/Input/NumberInput/index.es.js +51 -53
- package/dist/components/Input/PostfixInput/index.util.cjs.js +1 -1
- package/dist/components/Input/PostfixInput/index.util.es.js +22 -24
- package/dist/components/Input/TextField/index.cjs.js +1 -1
- package/dist/components/Input/TextField/index.es.js +13 -13
- package/dist/components/Input/index.cjs.js +1 -1
- package/dist/components/Input/index.es.js +30 -32
- 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 +20 -22
- 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.es.js +3 -3
- package/dist/components/MiniButton/UnderLineMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.es.js +13 -13
- package/dist/components/MiniButton/common/index.styled.cjs.js +1 -1
- package/dist/components/MiniButton/common/index.styled.es.js +21 -23
- package/dist/components/Modal/BaseModal/index.cjs.js +1 -1
- package/dist/components/Modal/BaseModal/index.es.js +1 -1
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.es.js +1 -1
- 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 +13 -13
- 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 +13 -13
- package/dist/components/OverlayRoot/index.cjs.js +1 -1
- package/dist/components/OverlayRoot/index.es.js +19 -21
- 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 +26 -28
- package/dist/components/Tabs/FillTabs/index.cjs.js +1 -1
- package/dist/components/Tabs/FillTabs/index.es.js +21 -23
- package/dist/components/Tabs/TextTabs/index.cjs.js +1 -1
- package/dist/components/Tabs/TextTabs/index.es.js +25 -27
- 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 +19 -21
- package/dist/components/Terms/index.cjs.js +1 -1
- package/dist/components/Terms/index.es.js +16 -17
- 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 +22 -24
- 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 +4 -2
- package/dist/components/index.es.js +90 -79
- 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 +448 -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 +461 -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 +387 -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 +20 -22
- 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 +20 -22
- package/dist/icons/src/aliases/aliases.cjs.js +1 -1
- package/dist/icons/src/aliases/aliases.d.ts +12 -12
- package/dist/icons/src/aliases/aliases.es.js +32 -32
- package/dist/icons/src/aliases/index.cjs.js +1 -1
- package/dist/icons/src/aliases/index.es.js +64 -64
- package/dist/icons/src/aliases/prefixed.cjs.js +1 -1
- package/dist/icons/src/aliases/prefixed.d.ts +16 -16
- 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 +17 -17
- package/dist/icons/src/aliases/suffixed.es.js +48 -48
- package/dist/icons/src/icons/index.cjs.js +1 -1
- package/dist/icons/src/icons/index.d.ts +10 -10
- package/dist/icons/src/icons/index.es.js +40 -40
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +282 -271
- package/dist/lib/utils.cjs.js +1 -1
- package/dist/lib/utils.es.js +2729 -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 +38 -37
- 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 +23 -25
- package/dist/library/BasicLayout/index.styled.cjs.js +1 -1
- package/dist/library/BasicLayout/index.styled.es.js +48 -50
- 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 +1 -1
- package/dist/utils/GenerateColorStyle/tab/fill-tabs.cjs.js +1 -1
- package/dist/utils/GenerateColorStyle/tab/fill-tabs.es.js +20 -22
- package/dist/utils/GenerateColorStyle/tab/text-tabs.cjs.js +1 -1
- package/dist/utils/GenerateColorStyle/tab/text-tabs.es.js +20 -22
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.es.js +1 -1
- package/package.json +9 -4
- 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.cvcvIoeD.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/Stepper/Step.cjs.js +0 -1
- package/dist/components/Stepper/Step.d.ts +0 -13
- package/dist/components/Stepper/Step.es.js +0 -46
- package/dist/components/Stepper/index.cjs.js +0 -1
- package/dist/components/Stepper/index.d.ts +0 -10
- package/dist/components/Stepper/index.es.js +0 -35
- 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
|
@@ -1,1072 +0,0 @@
|
|
|
1
|
-
import * as c from "react";
|
|
2
|
-
import { useState as et } from "react";
|
|
3
|
-
import { b as A, d as tt, c as nt, P as ie, e as rt, u as ot, a as Z } from "./index.B0KRXeX3.js";
|
|
4
|
-
import { u as k } from "./index.DLcqcWxM.js";
|
|
5
|
-
import * as at from "react-dom";
|
|
6
|
-
import it from "react-dom";
|
|
7
|
-
import { c as Se } from "./index.BiFBNKMb.js";
|
|
8
|
-
import { j as p } from "./jsx-runtime.Drh4NO5G.js";
|
|
9
|
-
var ct = [
|
|
10
|
-
"a",
|
|
11
|
-
"button",
|
|
12
|
-
"div",
|
|
13
|
-
"form",
|
|
14
|
-
"h2",
|
|
15
|
-
"h3",
|
|
16
|
-
"img",
|
|
17
|
-
"input",
|
|
18
|
-
"label",
|
|
19
|
-
"li",
|
|
20
|
-
"nav",
|
|
21
|
-
"ol",
|
|
22
|
-
"p",
|
|
23
|
-
"select",
|
|
24
|
-
"span",
|
|
25
|
-
"svg",
|
|
26
|
-
"ul"
|
|
27
|
-
], T = ct.reduce((e, t) => {
|
|
28
|
-
const n = Se(`Primitive.${t}`), r = c.forwardRef((o, a) => {
|
|
29
|
-
const { asChild: s, ...i } = o, m = s ? n : t;
|
|
30
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p.jsx(m, { ...i, ref: a });
|
|
31
|
-
});
|
|
32
|
-
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
33
|
-
}, {});
|
|
34
|
-
function st(e, t) {
|
|
35
|
-
e && at.flushSync(() => e.dispatchEvent(t));
|
|
36
|
-
}
|
|
37
|
-
function j(e) {
|
|
38
|
-
const t = c.useRef(e);
|
|
39
|
-
return c.useEffect(() => {
|
|
40
|
-
t.current = e;
|
|
41
|
-
}), c.useMemo(() => (...n) => {
|
|
42
|
-
var r;
|
|
43
|
-
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
44
|
-
}, []);
|
|
45
|
-
}
|
|
46
|
-
function ut(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
47
|
-
const n = j(e);
|
|
48
|
-
c.useEffect(() => {
|
|
49
|
-
const r = (o) => {
|
|
50
|
-
o.key === "Escape" && n(o);
|
|
51
|
-
};
|
|
52
|
-
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
53
|
-
}, [n, t]);
|
|
54
|
-
}
|
|
55
|
-
var lt = "DismissableLayer", oe = "dismissableLayer.update", dt = "dismissableLayer.pointerDownOutside", ft = "dismissableLayer.focusOutside", le, we = c.createContext({
|
|
56
|
-
layers: /* @__PURE__ */ new Set(),
|
|
57
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
58
|
-
branches: /* @__PURE__ */ new Set()
|
|
59
|
-
}), De = c.forwardRef(
|
|
60
|
-
(e, t) => {
|
|
61
|
-
const {
|
|
62
|
-
disableOutsidePointerEvents: n = !1,
|
|
63
|
-
onEscapeKeyDown: r,
|
|
64
|
-
onPointerDownOutside: o,
|
|
65
|
-
onFocusOutside: a,
|
|
66
|
-
onInteractOutside: s,
|
|
67
|
-
onDismiss: i,
|
|
68
|
-
...m
|
|
69
|
-
} = e, l = c.useContext(we), [d, v] = c.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, y] = c.useState({}), D = k(t, (E) => v(E)), u = Array.from(l.layers), [f] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), g = u.indexOf(f), w = d ? u.indexOf(d) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= g, S = mt((E) => {
|
|
70
|
-
const x = E.target, W = [...l.branches].some((z) => z.contains(x));
|
|
71
|
-
!C || W || (o == null || o(E), s == null || s(E), E.defaultPrevented || i == null || i());
|
|
72
|
-
}, h), O = pt((E) => {
|
|
73
|
-
const x = E.target;
|
|
74
|
-
[...l.branches].some((z) => z.contains(x)) || (a == null || a(E), s == null || s(E), E.defaultPrevented || i == null || i());
|
|
75
|
-
}, h);
|
|
76
|
-
return ut((E) => {
|
|
77
|
-
w === l.layers.size - 1 && (r == null || r(E), !E.defaultPrevented && i && (E.preventDefault(), i()));
|
|
78
|
-
}, h), c.useEffect(() => {
|
|
79
|
-
if (d)
|
|
80
|
-
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (le = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(d)), l.layers.add(d), de(), () => {
|
|
81
|
-
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = le);
|
|
82
|
-
};
|
|
83
|
-
}, [d, h, n, l]), c.useEffect(() => () => {
|
|
84
|
-
d && (l.layers.delete(d), l.layersWithOutsidePointerEventsDisabled.delete(d), de());
|
|
85
|
-
}, [d, l]), c.useEffect(() => {
|
|
86
|
-
const E = () => y({});
|
|
87
|
-
return document.addEventListener(oe, E), () => document.removeEventListener(oe, E);
|
|
88
|
-
}, []), /* @__PURE__ */ p.jsx(
|
|
89
|
-
T.div,
|
|
90
|
-
{
|
|
91
|
-
...m,
|
|
92
|
-
ref: D,
|
|
93
|
-
style: {
|
|
94
|
-
pointerEvents: b ? C ? "auto" : "none" : void 0,
|
|
95
|
-
...e.style
|
|
96
|
-
},
|
|
97
|
-
onFocusCapture: A(e.onFocusCapture, O.onFocusCapture),
|
|
98
|
-
onBlurCapture: A(e.onBlurCapture, O.onBlurCapture),
|
|
99
|
-
onPointerDownCapture: A(
|
|
100
|
-
e.onPointerDownCapture,
|
|
101
|
-
S.onPointerDownCapture
|
|
102
|
-
)
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
De.displayName = lt;
|
|
108
|
-
var vt = "DismissableLayerBranch", ht = c.forwardRef((e, t) => {
|
|
109
|
-
const n = c.useContext(we), r = c.useRef(null), o = k(t, r);
|
|
110
|
-
return c.useEffect(() => {
|
|
111
|
-
const a = r.current;
|
|
112
|
-
if (a)
|
|
113
|
-
return n.branches.add(a), () => {
|
|
114
|
-
n.branches.delete(a);
|
|
115
|
-
};
|
|
116
|
-
}, [n.branches]), /* @__PURE__ */ p.jsx(T.div, { ...e, ref: o });
|
|
117
|
-
});
|
|
118
|
-
ht.displayName = vt;
|
|
119
|
-
function mt(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
120
|
-
const n = j(e), r = c.useRef(!1), o = c.useRef(() => {
|
|
121
|
-
});
|
|
122
|
-
return c.useEffect(() => {
|
|
123
|
-
const a = (i) => {
|
|
124
|
-
if (i.target && !r.current) {
|
|
125
|
-
let m = function() {
|
|
126
|
-
Re(
|
|
127
|
-
dt,
|
|
128
|
-
n,
|
|
129
|
-
l,
|
|
130
|
-
{ discrete: !0 }
|
|
131
|
-
);
|
|
132
|
-
};
|
|
133
|
-
const l = { originalEvent: i };
|
|
134
|
-
i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = m, t.addEventListener("click", o.current, { once: !0 })) : m();
|
|
135
|
-
} else
|
|
136
|
-
t.removeEventListener("click", o.current);
|
|
137
|
-
r.current = !1;
|
|
138
|
-
}, s = window.setTimeout(() => {
|
|
139
|
-
t.addEventListener("pointerdown", a);
|
|
140
|
-
}, 0);
|
|
141
|
-
return () => {
|
|
142
|
-
window.clearTimeout(s), t.removeEventListener("pointerdown", a), t.removeEventListener("click", o.current);
|
|
143
|
-
};
|
|
144
|
-
}, [t, n]), {
|
|
145
|
-
// ensures we check React component tree (not just DOM tree)
|
|
146
|
-
onPointerDownCapture: () => r.current = !0
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
function pt(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
150
|
-
const n = j(e), r = c.useRef(!1);
|
|
151
|
-
return c.useEffect(() => {
|
|
152
|
-
const o = (a) => {
|
|
153
|
-
a.target && !r.current && Re(ft, n, { originalEvent: a }, {
|
|
154
|
-
discrete: !1
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
|
|
158
|
-
}, [t, n]), {
|
|
159
|
-
onFocusCapture: () => r.current = !0,
|
|
160
|
-
onBlurCapture: () => r.current = !1
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
function de() {
|
|
164
|
-
const e = new CustomEvent(oe);
|
|
165
|
-
document.dispatchEvent(e);
|
|
166
|
-
}
|
|
167
|
-
function Re(e, t, n, { discrete: r }) {
|
|
168
|
-
const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
169
|
-
t && o.addEventListener(e, t, { once: !0 }), r ? st(o, a) : o.dispatchEvent(a);
|
|
170
|
-
}
|
|
171
|
-
var q = "focusScope.autoFocusOnMount", Q = "focusScope.autoFocusOnUnmount", fe = { bubbles: !1, cancelable: !0 }, gt = "FocusScope", Pe = c.forwardRef((e, t) => {
|
|
172
|
-
const {
|
|
173
|
-
loop: n = !1,
|
|
174
|
-
trapped: r = !1,
|
|
175
|
-
onMountAutoFocus: o,
|
|
176
|
-
onUnmountAutoFocus: a,
|
|
177
|
-
...s
|
|
178
|
-
} = e, [i, m] = c.useState(null), l = j(o), d = j(a), v = c.useRef(null), h = k(t, (u) => m(u)), y = c.useRef({
|
|
179
|
-
paused: !1,
|
|
180
|
-
pause() {
|
|
181
|
-
this.paused = !0;
|
|
182
|
-
},
|
|
183
|
-
resume() {
|
|
184
|
-
this.paused = !1;
|
|
185
|
-
}
|
|
186
|
-
}).current;
|
|
187
|
-
c.useEffect(() => {
|
|
188
|
-
if (r) {
|
|
189
|
-
let u = function(b) {
|
|
190
|
-
if (y.paused || !i) return;
|
|
191
|
-
const C = b.target;
|
|
192
|
-
i.contains(C) ? v.current = C : N(v.current, { select: !0 });
|
|
193
|
-
}, f = function(b) {
|
|
194
|
-
if (y.paused || !i) return;
|
|
195
|
-
const C = b.relatedTarget;
|
|
196
|
-
C !== null && (i.contains(C) || N(v.current, { select: !0 }));
|
|
197
|
-
}, g = function(b) {
|
|
198
|
-
if (document.activeElement === document.body)
|
|
199
|
-
for (const S of b)
|
|
200
|
-
S.removedNodes.length > 0 && N(i);
|
|
201
|
-
};
|
|
202
|
-
document.addEventListener("focusin", u), document.addEventListener("focusout", f);
|
|
203
|
-
const w = new MutationObserver(g);
|
|
204
|
-
return i && w.observe(i, { childList: !0, subtree: !0 }), () => {
|
|
205
|
-
document.removeEventListener("focusin", u), document.removeEventListener("focusout", f), w.disconnect();
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
}, [r, i, y.paused]), c.useEffect(() => {
|
|
209
|
-
if (i) {
|
|
210
|
-
he.add(y);
|
|
211
|
-
const u = document.activeElement;
|
|
212
|
-
if (!i.contains(u)) {
|
|
213
|
-
const g = new CustomEvent(q, fe);
|
|
214
|
-
i.addEventListener(q, l), i.dispatchEvent(g), g.defaultPrevented || (yt(wt(Oe(i)), { select: !0 }), document.activeElement === u && N(i));
|
|
215
|
-
}
|
|
216
|
-
return () => {
|
|
217
|
-
i.removeEventListener(q, l), setTimeout(() => {
|
|
218
|
-
const g = new CustomEvent(Q, fe);
|
|
219
|
-
i.addEventListener(Q, d), i.dispatchEvent(g), g.defaultPrevented || N(u ?? document.body, { select: !0 }), i.removeEventListener(Q, d), he.remove(y);
|
|
220
|
-
}, 0);
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
}, [i, l, d, y]);
|
|
224
|
-
const D = c.useCallback(
|
|
225
|
-
(u) => {
|
|
226
|
-
if (!n && !r || y.paused) return;
|
|
227
|
-
const f = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, g = document.activeElement;
|
|
228
|
-
if (f && g) {
|
|
229
|
-
const w = u.currentTarget, [b, C] = Et(w);
|
|
230
|
-
b && C ? !u.shiftKey && g === C ? (u.preventDefault(), n && N(b, { select: !0 })) : u.shiftKey && g === b && (u.preventDefault(), n && N(C, { select: !0 })) : g === w && u.preventDefault();
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
[n, r, y.paused]
|
|
234
|
-
);
|
|
235
|
-
return /* @__PURE__ */ p.jsx(T.div, { tabIndex: -1, ...s, ref: h, onKeyDown: D });
|
|
236
|
-
});
|
|
237
|
-
Pe.displayName = gt;
|
|
238
|
-
function yt(e, { select: t = !1 } = {}) {
|
|
239
|
-
const n = document.activeElement;
|
|
240
|
-
for (const r of e)
|
|
241
|
-
if (N(r, { select: t }), document.activeElement !== n) return;
|
|
242
|
-
}
|
|
243
|
-
function Et(e) {
|
|
244
|
-
const t = Oe(e), n = ve(t, e), r = ve(t.reverse(), e);
|
|
245
|
-
return [n, r];
|
|
246
|
-
}
|
|
247
|
-
function Oe(e) {
|
|
248
|
-
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
249
|
-
acceptNode: (r) => {
|
|
250
|
-
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
251
|
-
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
252
|
-
}
|
|
253
|
-
});
|
|
254
|
-
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
255
|
-
return t;
|
|
256
|
-
}
|
|
257
|
-
function ve(e, t) {
|
|
258
|
-
for (const n of e)
|
|
259
|
-
if (!bt(n, { upTo: t })) return n;
|
|
260
|
-
}
|
|
261
|
-
function bt(e, { upTo: t }) {
|
|
262
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
263
|
-
for (; e; ) {
|
|
264
|
-
if (t !== void 0 && e === t) return !1;
|
|
265
|
-
if (getComputedStyle(e).display === "none") return !0;
|
|
266
|
-
e = e.parentElement;
|
|
267
|
-
}
|
|
268
|
-
return !1;
|
|
269
|
-
}
|
|
270
|
-
function Ct(e) {
|
|
271
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
272
|
-
}
|
|
273
|
-
function N(e, { select: t = !1 } = {}) {
|
|
274
|
-
if (e && e.focus) {
|
|
275
|
-
const n = document.activeElement;
|
|
276
|
-
e.focus({ preventScroll: !0 }), e !== n && Ct(e) && t && e.select();
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
var he = St();
|
|
280
|
-
function St() {
|
|
281
|
-
let e = [];
|
|
282
|
-
return {
|
|
283
|
-
add(t) {
|
|
284
|
-
const n = e[0];
|
|
285
|
-
t !== n && (n == null || n.pause()), e = me(e, t), e.unshift(t);
|
|
286
|
-
},
|
|
287
|
-
remove(t) {
|
|
288
|
-
var n;
|
|
289
|
-
e = me(e, t), (n = e[0]) == null || n.resume();
|
|
290
|
-
}
|
|
291
|
-
};
|
|
292
|
-
}
|
|
293
|
-
function me(e, t) {
|
|
294
|
-
const n = [...e], r = n.indexOf(t);
|
|
295
|
-
return r !== -1 && n.splice(r, 1), n;
|
|
296
|
-
}
|
|
297
|
-
function wt(e) {
|
|
298
|
-
return e.filter((t) => t.tagName !== "A");
|
|
299
|
-
}
|
|
300
|
-
var Dt = "Portal", xe = c.forwardRef((e, t) => {
|
|
301
|
-
var i;
|
|
302
|
-
const { container: n, ...r } = e, [o, a] = c.useState(!1);
|
|
303
|
-
tt(() => a(!0), []);
|
|
304
|
-
const s = n || o && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
|
|
305
|
-
return s ? it.createPortal(/* @__PURE__ */ p.jsx(T.div, { ...r, ref: t }), s) : null;
|
|
306
|
-
});
|
|
307
|
-
xe.displayName = Dt;
|
|
308
|
-
var J = 0;
|
|
309
|
-
function Rt() {
|
|
310
|
-
c.useEffect(() => {
|
|
311
|
-
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
312
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? pe()), document.body.insertAdjacentElement("beforeend", e[1] ?? pe()), J++, () => {
|
|
313
|
-
J === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), J--;
|
|
314
|
-
};
|
|
315
|
-
}, []);
|
|
316
|
-
}
|
|
317
|
-
function pe() {
|
|
318
|
-
const e = document.createElement("span");
|
|
319
|
-
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
320
|
-
}
|
|
321
|
-
var P = function() {
|
|
322
|
-
return P = Object.assign || function(t) {
|
|
323
|
-
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
324
|
-
n = arguments[r];
|
|
325
|
-
for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
|
|
326
|
-
}
|
|
327
|
-
return t;
|
|
328
|
-
}, P.apply(this, arguments);
|
|
329
|
-
};
|
|
330
|
-
function Te(e, t) {
|
|
331
|
-
var n = {};
|
|
332
|
-
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
333
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
334
|
-
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
|
|
335
|
-
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
336
|
-
return n;
|
|
337
|
-
}
|
|
338
|
-
function Pt(e, t, n) {
|
|
339
|
-
if (n || arguments.length === 2) for (var r = 0, o = t.length, a; r < o; r++)
|
|
340
|
-
(a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
|
|
341
|
-
return e.concat(a || Array.prototype.slice.call(t));
|
|
342
|
-
}
|
|
343
|
-
var V = "right-scroll-bar-position", G = "width-before-scroll-bar", Ot = "with-scroll-bars-hidden", xt = "--removed-body-scroll-bar-size";
|
|
344
|
-
function ee(e, t) {
|
|
345
|
-
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
346
|
-
}
|
|
347
|
-
function Tt(e, t) {
|
|
348
|
-
var n = et(function() {
|
|
349
|
-
return {
|
|
350
|
-
// value
|
|
351
|
-
value: e,
|
|
352
|
-
// last callback
|
|
353
|
-
callback: t,
|
|
354
|
-
// "memoized" public interface
|
|
355
|
-
facade: {
|
|
356
|
-
get current() {
|
|
357
|
-
return n.value;
|
|
358
|
-
},
|
|
359
|
-
set current(r) {
|
|
360
|
-
var o = n.value;
|
|
361
|
-
o !== r && (n.value = r, n.callback(r, o));
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
};
|
|
365
|
-
})[0];
|
|
366
|
-
return n.callback = t, n.facade;
|
|
367
|
-
}
|
|
368
|
-
var Nt = typeof window < "u" ? c.useLayoutEffect : c.useEffect, ge = /* @__PURE__ */ new WeakMap();
|
|
369
|
-
function At(e, t) {
|
|
370
|
-
var n = Tt(null, function(r) {
|
|
371
|
-
return e.forEach(function(o) {
|
|
372
|
-
return ee(o, r);
|
|
373
|
-
});
|
|
374
|
-
});
|
|
375
|
-
return Nt(function() {
|
|
376
|
-
var r = ge.get(n);
|
|
377
|
-
if (r) {
|
|
378
|
-
var o = new Set(r), a = new Set(e), s = n.current;
|
|
379
|
-
o.forEach(function(i) {
|
|
380
|
-
a.has(i) || ee(i, null);
|
|
381
|
-
}), a.forEach(function(i) {
|
|
382
|
-
o.has(i) || ee(i, s);
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
ge.set(n, e);
|
|
386
|
-
}, [e]), n;
|
|
387
|
-
}
|
|
388
|
-
function Lt(e) {
|
|
389
|
-
return e;
|
|
390
|
-
}
|
|
391
|
-
function It(e, t) {
|
|
392
|
-
t === void 0 && (t = Lt);
|
|
393
|
-
var n = [], r = !1, o = {
|
|
394
|
-
read: function() {
|
|
395
|
-
if (r)
|
|
396
|
-
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
397
|
-
return n.length ? n[n.length - 1] : e;
|
|
398
|
-
},
|
|
399
|
-
useMedium: function(a) {
|
|
400
|
-
var s = t(a, r);
|
|
401
|
-
return n.push(s), function() {
|
|
402
|
-
n = n.filter(function(i) {
|
|
403
|
-
return i !== s;
|
|
404
|
-
});
|
|
405
|
-
};
|
|
406
|
-
},
|
|
407
|
-
assignSyncMedium: function(a) {
|
|
408
|
-
for (r = !0; n.length; ) {
|
|
409
|
-
var s = n;
|
|
410
|
-
n = [], s.forEach(a);
|
|
411
|
-
}
|
|
412
|
-
n = {
|
|
413
|
-
push: function(i) {
|
|
414
|
-
return a(i);
|
|
415
|
-
},
|
|
416
|
-
filter: function() {
|
|
417
|
-
return n;
|
|
418
|
-
}
|
|
419
|
-
};
|
|
420
|
-
},
|
|
421
|
-
assignMedium: function(a) {
|
|
422
|
-
r = !0;
|
|
423
|
-
var s = [];
|
|
424
|
-
if (n.length) {
|
|
425
|
-
var i = n;
|
|
426
|
-
n = [], i.forEach(a), s = n;
|
|
427
|
-
}
|
|
428
|
-
var m = function() {
|
|
429
|
-
var d = s;
|
|
430
|
-
s = [], d.forEach(a);
|
|
431
|
-
}, l = function() {
|
|
432
|
-
return Promise.resolve().then(m);
|
|
433
|
-
};
|
|
434
|
-
l(), n = {
|
|
435
|
-
push: function(d) {
|
|
436
|
-
s.push(d), l();
|
|
437
|
-
},
|
|
438
|
-
filter: function(d) {
|
|
439
|
-
return s = s.filter(d), n;
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
|
-
return o;
|
|
445
|
-
}
|
|
446
|
-
function Mt(e) {
|
|
447
|
-
e === void 0 && (e = {});
|
|
448
|
-
var t = It(null);
|
|
449
|
-
return t.options = P({ async: !0, ssr: !1 }, e), t;
|
|
450
|
-
}
|
|
451
|
-
var Ne = function(e) {
|
|
452
|
-
var t = e.sideCar, n = Te(e, ["sideCar"]);
|
|
453
|
-
if (!t)
|
|
454
|
-
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
455
|
-
var r = t.read();
|
|
456
|
-
if (!r)
|
|
457
|
-
throw new Error("Sidecar medium not found");
|
|
458
|
-
return c.createElement(r, P({}, n));
|
|
459
|
-
};
|
|
460
|
-
Ne.isSideCarExport = !0;
|
|
461
|
-
function _t(e, t) {
|
|
462
|
-
return e.useMedium(t), Ne;
|
|
463
|
-
}
|
|
464
|
-
var Ae = Mt(), te = function() {
|
|
465
|
-
}, X = c.forwardRef(function(e, t) {
|
|
466
|
-
var n = c.useRef(null), r = c.useState({
|
|
467
|
-
onScrollCapture: te,
|
|
468
|
-
onWheelCapture: te,
|
|
469
|
-
onTouchMoveCapture: te
|
|
470
|
-
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, m = e.className, l = e.removeScrollBar, d = e.enabled, v = e.shards, h = e.sideCar, y = e.noIsolation, D = e.inert, u = e.allowPinchZoom, f = e.as, g = f === void 0 ? "div" : f, w = e.gapMode, b = Te(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, S = At([n, t]), O = P(P({}, b), o);
|
|
471
|
-
return c.createElement(
|
|
472
|
-
c.Fragment,
|
|
473
|
-
null,
|
|
474
|
-
d && c.createElement(C, { sideCar: Ae, removeScrollBar: l, shards: v, noIsolation: y, inert: D, setCallbacks: a, allowPinchZoom: !!u, lockRef: n, gapMode: w }),
|
|
475
|
-
s ? c.cloneElement(c.Children.only(i), P(P({}, O), { ref: S })) : c.createElement(g, P({}, O, { className: m, ref: S }), i)
|
|
476
|
-
);
|
|
477
|
-
});
|
|
478
|
-
X.defaultProps = {
|
|
479
|
-
enabled: !0,
|
|
480
|
-
removeScrollBar: !0,
|
|
481
|
-
inert: !1
|
|
482
|
-
};
|
|
483
|
-
X.classNames = {
|
|
484
|
-
fullWidth: G,
|
|
485
|
-
zeroRight: V
|
|
486
|
-
};
|
|
487
|
-
var Ft = function() {
|
|
488
|
-
if (typeof __webpack_nonce__ < "u")
|
|
489
|
-
return __webpack_nonce__;
|
|
490
|
-
};
|
|
491
|
-
function kt() {
|
|
492
|
-
if (!document)
|
|
493
|
-
return null;
|
|
494
|
-
var e = document.createElement("style");
|
|
495
|
-
e.type = "text/css";
|
|
496
|
-
var t = Ft();
|
|
497
|
-
return t && e.setAttribute("nonce", t), e;
|
|
498
|
-
}
|
|
499
|
-
function Wt(e, t) {
|
|
500
|
-
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
501
|
-
}
|
|
502
|
-
function jt(e) {
|
|
503
|
-
var t = document.head || document.getElementsByTagName("head")[0];
|
|
504
|
-
t.appendChild(e);
|
|
505
|
-
}
|
|
506
|
-
var Bt = function() {
|
|
507
|
-
var e = 0, t = null;
|
|
508
|
-
return {
|
|
509
|
-
add: function(n) {
|
|
510
|
-
e == 0 && (t = kt()) && (Wt(t, n), jt(t)), e++;
|
|
511
|
-
},
|
|
512
|
-
remove: function() {
|
|
513
|
-
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
514
|
-
}
|
|
515
|
-
};
|
|
516
|
-
}, Ut = function() {
|
|
517
|
-
var e = Bt();
|
|
518
|
-
return function(t, n) {
|
|
519
|
-
c.useEffect(function() {
|
|
520
|
-
return e.add(t), function() {
|
|
521
|
-
e.remove();
|
|
522
|
-
};
|
|
523
|
-
}, [t && n]);
|
|
524
|
-
};
|
|
525
|
-
}, Le = function() {
|
|
526
|
-
var e = Ut(), t = function(n) {
|
|
527
|
-
var r = n.styles, o = n.dynamic;
|
|
528
|
-
return e(r, o), null;
|
|
529
|
-
};
|
|
530
|
-
return t;
|
|
531
|
-
}, Ht = {
|
|
532
|
-
left: 0,
|
|
533
|
-
top: 0,
|
|
534
|
-
right: 0,
|
|
535
|
-
gap: 0
|
|
536
|
-
}, ne = function(e) {
|
|
537
|
-
return parseInt(e || "", 10) || 0;
|
|
538
|
-
}, Kt = function(e) {
|
|
539
|
-
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
540
|
-
return [ne(n), ne(r), ne(o)];
|
|
541
|
-
}, Vt = function(e) {
|
|
542
|
-
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
543
|
-
return Ht;
|
|
544
|
-
var t = Kt(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
545
|
-
return {
|
|
546
|
-
left: t[0],
|
|
547
|
-
top: t[1],
|
|
548
|
-
right: t[2],
|
|
549
|
-
gap: Math.max(0, r - n + t[2] - t[0])
|
|
550
|
-
};
|
|
551
|
-
}, Gt = Le(), F = "data-scroll-locked", Yt = function(e, t, n, r) {
|
|
552
|
-
var o = e.left, a = e.top, s = e.right, i = e.gap;
|
|
553
|
-
return n === void 0 && (n = "margin"), `
|
|
554
|
-
.`.concat(Ot, ` {
|
|
555
|
-
overflow: hidden `).concat(r, `;
|
|
556
|
-
padding-right: `).concat(i, "px ").concat(r, `;
|
|
557
|
-
}
|
|
558
|
-
body[`).concat(F, `] {
|
|
559
|
-
overflow: hidden `).concat(r, `;
|
|
560
|
-
overscroll-behavior: contain;
|
|
561
|
-
`).concat([
|
|
562
|
-
t && "position: relative ".concat(r, ";"),
|
|
563
|
-
n === "margin" && `
|
|
564
|
-
padding-left: `.concat(o, `px;
|
|
565
|
-
padding-top: `).concat(a, `px;
|
|
566
|
-
padding-right: `).concat(s, `px;
|
|
567
|
-
margin-left:0;
|
|
568
|
-
margin-top:0;
|
|
569
|
-
margin-right: `).concat(i, "px ").concat(r, `;
|
|
570
|
-
`),
|
|
571
|
-
n === "padding" && "padding-right: ".concat(i, "px ").concat(r, ";")
|
|
572
|
-
].filter(Boolean).join(""), `
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
.`).concat(V, ` {
|
|
576
|
-
right: `).concat(i, "px ").concat(r, `;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
.`).concat(G, ` {
|
|
580
|
-
margin-right: `).concat(i, "px ").concat(r, `;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
.`).concat(V, " .").concat(V, ` {
|
|
584
|
-
right: 0 `).concat(r, `;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
.`).concat(G, " .").concat(G, ` {
|
|
588
|
-
margin-right: 0 `).concat(r, `;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
body[`).concat(F, `] {
|
|
592
|
-
`).concat(xt, ": ").concat(i, `px;
|
|
593
|
-
}
|
|
594
|
-
`);
|
|
595
|
-
}, ye = function() {
|
|
596
|
-
var e = parseInt(document.body.getAttribute(F) || "0", 10);
|
|
597
|
-
return isFinite(e) ? e : 0;
|
|
598
|
-
}, Xt = function() {
|
|
599
|
-
c.useEffect(function() {
|
|
600
|
-
return document.body.setAttribute(F, (ye() + 1).toString()), function() {
|
|
601
|
-
var e = ye() - 1;
|
|
602
|
-
e <= 0 ? document.body.removeAttribute(F) : document.body.setAttribute(F, e.toString());
|
|
603
|
-
};
|
|
604
|
-
}, []);
|
|
605
|
-
}, $t = function(e) {
|
|
606
|
-
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
607
|
-
Xt();
|
|
608
|
-
var a = c.useMemo(function() {
|
|
609
|
-
return Vt(o);
|
|
610
|
-
}, [o]);
|
|
611
|
-
return c.createElement(Gt, { styles: Yt(a, !t, o, n ? "" : "!important") });
|
|
612
|
-
}, ae = !1;
|
|
613
|
-
if (typeof window < "u")
|
|
614
|
-
try {
|
|
615
|
-
var B = Object.defineProperty({}, "passive", {
|
|
616
|
-
get: function() {
|
|
617
|
-
return ae = !0, !0;
|
|
618
|
-
}
|
|
619
|
-
});
|
|
620
|
-
window.addEventListener("test", B, B), window.removeEventListener("test", B, B);
|
|
621
|
-
} catch {
|
|
622
|
-
ae = !1;
|
|
623
|
-
}
|
|
624
|
-
var I = ae ? { passive: !1 } : !1, zt = function(e) {
|
|
625
|
-
return e.tagName === "TEXTAREA";
|
|
626
|
-
}, Ie = function(e, t) {
|
|
627
|
-
if (!(e instanceof Element))
|
|
628
|
-
return !1;
|
|
629
|
-
var n = window.getComputedStyle(e);
|
|
630
|
-
return (
|
|
631
|
-
// not-not-scrollable
|
|
632
|
-
n[t] !== "hidden" && // contains scroll inside self
|
|
633
|
-
!(n.overflowY === n.overflowX && !zt(e) && n[t] === "visible")
|
|
634
|
-
);
|
|
635
|
-
}, Zt = function(e) {
|
|
636
|
-
return Ie(e, "overflowY");
|
|
637
|
-
}, qt = function(e) {
|
|
638
|
-
return Ie(e, "overflowX");
|
|
639
|
-
}, Ee = function(e, t) {
|
|
640
|
-
var n = t.ownerDocument, r = t;
|
|
641
|
-
do {
|
|
642
|
-
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
643
|
-
var o = Me(e, r);
|
|
644
|
-
if (o) {
|
|
645
|
-
var a = _e(e, r), s = a[1], i = a[2];
|
|
646
|
-
if (s > i)
|
|
647
|
-
return !0;
|
|
648
|
-
}
|
|
649
|
-
r = r.parentNode;
|
|
650
|
-
} while (r && r !== n.body);
|
|
651
|
-
return !1;
|
|
652
|
-
}, Qt = function(e) {
|
|
653
|
-
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
654
|
-
return [
|
|
655
|
-
t,
|
|
656
|
-
n,
|
|
657
|
-
r
|
|
658
|
-
];
|
|
659
|
-
}, Jt = function(e) {
|
|
660
|
-
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
661
|
-
return [
|
|
662
|
-
t,
|
|
663
|
-
n,
|
|
664
|
-
r
|
|
665
|
-
];
|
|
666
|
-
}, Me = function(e, t) {
|
|
667
|
-
return e === "v" ? Zt(t) : qt(t);
|
|
668
|
-
}, _e = function(e, t) {
|
|
669
|
-
return e === "v" ? Qt(t) : Jt(t);
|
|
670
|
-
}, en = function(e, t) {
|
|
671
|
-
return e === "h" && t === "rtl" ? -1 : 1;
|
|
672
|
-
}, tn = function(e, t, n, r, o) {
|
|
673
|
-
var a = en(e, window.getComputedStyle(t).direction), s = a * r, i = n.target, m = t.contains(i), l = !1, d = s > 0, v = 0, h = 0;
|
|
674
|
-
do {
|
|
675
|
-
var y = _e(e, i), D = y[0], u = y[1], f = y[2], g = u - f - a * D;
|
|
676
|
-
(D || g) && Me(e, i) && (v += g, h += D), i instanceof ShadowRoot ? i = i.host : i = i.parentNode;
|
|
677
|
-
} while (
|
|
678
|
-
// portaled content
|
|
679
|
-
!m && i !== document.body || // self content
|
|
680
|
-
m && (t.contains(i) || t === i)
|
|
681
|
-
);
|
|
682
|
-
return (d && Math.abs(v) < 1 || !d && Math.abs(h) < 1) && (l = !0), l;
|
|
683
|
-
}, U = function(e) {
|
|
684
|
-
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
685
|
-
}, be = function(e) {
|
|
686
|
-
return [e.deltaX, e.deltaY];
|
|
687
|
-
}, Ce = function(e) {
|
|
688
|
-
return e && "current" in e ? e.current : e;
|
|
689
|
-
}, nn = function(e, t) {
|
|
690
|
-
return e[0] === t[0] && e[1] === t[1];
|
|
691
|
-
}, rn = function(e) {
|
|
692
|
-
return `
|
|
693
|
-
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
694
|
-
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
695
|
-
`);
|
|
696
|
-
}, on = 0, M = [];
|
|
697
|
-
function an(e) {
|
|
698
|
-
var t = c.useRef([]), n = c.useRef([0, 0]), r = c.useRef(), o = c.useState(on++)[0], a = c.useState(Le)[0], s = c.useRef(e);
|
|
699
|
-
c.useEffect(function() {
|
|
700
|
-
s.current = e;
|
|
701
|
-
}, [e]), c.useEffect(function() {
|
|
702
|
-
if (e.inert) {
|
|
703
|
-
document.body.classList.add("block-interactivity-".concat(o));
|
|
704
|
-
var u = Pt([e.lockRef.current], (e.shards || []).map(Ce), !0).filter(Boolean);
|
|
705
|
-
return u.forEach(function(f) {
|
|
706
|
-
return f.classList.add("allow-interactivity-".concat(o));
|
|
707
|
-
}), function() {
|
|
708
|
-
document.body.classList.remove("block-interactivity-".concat(o)), u.forEach(function(f) {
|
|
709
|
-
return f.classList.remove("allow-interactivity-".concat(o));
|
|
710
|
-
});
|
|
711
|
-
};
|
|
712
|
-
}
|
|
713
|
-
}, [e.inert, e.lockRef.current, e.shards]);
|
|
714
|
-
var i = c.useCallback(function(u, f) {
|
|
715
|
-
if ("touches" in u && u.touches.length === 2 || u.type === "wheel" && u.ctrlKey)
|
|
716
|
-
return !s.current.allowPinchZoom;
|
|
717
|
-
var g = U(u), w = n.current, b = "deltaX" in u ? u.deltaX : w[0] - g[0], C = "deltaY" in u ? u.deltaY : w[1] - g[1], S, O = u.target, E = Math.abs(b) > Math.abs(C) ? "h" : "v";
|
|
718
|
-
if ("touches" in u && E === "h" && O.type === "range")
|
|
719
|
-
return !1;
|
|
720
|
-
var x = Ee(E, O);
|
|
721
|
-
if (!x)
|
|
722
|
-
return !0;
|
|
723
|
-
if (x ? S = E : (S = E === "v" ? "h" : "v", x = Ee(E, O)), !x)
|
|
724
|
-
return !1;
|
|
725
|
-
if (!r.current && "changedTouches" in u && (b || C) && (r.current = S), !S)
|
|
726
|
-
return !0;
|
|
727
|
-
var W = r.current || S;
|
|
728
|
-
return tn(W, f, u, W === "h" ? b : C);
|
|
729
|
-
}, []), m = c.useCallback(function(u) {
|
|
730
|
-
var f = u;
|
|
731
|
-
if (!(!M.length || M[M.length - 1] !== a)) {
|
|
732
|
-
var g = "deltaY" in f ? be(f) : U(f), w = t.current.filter(function(S) {
|
|
733
|
-
return S.name === f.type && (S.target === f.target || f.target === S.shadowParent) && nn(S.delta, g);
|
|
734
|
-
})[0];
|
|
735
|
-
if (w && w.should) {
|
|
736
|
-
f.cancelable && f.preventDefault();
|
|
737
|
-
return;
|
|
738
|
-
}
|
|
739
|
-
if (!w) {
|
|
740
|
-
var b = (s.current.shards || []).map(Ce).filter(Boolean).filter(function(S) {
|
|
741
|
-
return S.contains(f.target);
|
|
742
|
-
}), C = b.length > 0 ? i(f, b[0]) : !s.current.noIsolation;
|
|
743
|
-
C && f.cancelable && f.preventDefault();
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
}, []), l = c.useCallback(function(u, f, g, w) {
|
|
747
|
-
var b = { name: u, delta: f, target: g, should: w, shadowParent: cn(g) };
|
|
748
|
-
t.current.push(b), setTimeout(function() {
|
|
749
|
-
t.current = t.current.filter(function(C) {
|
|
750
|
-
return C !== b;
|
|
751
|
-
});
|
|
752
|
-
}, 1);
|
|
753
|
-
}, []), d = c.useCallback(function(u) {
|
|
754
|
-
n.current = U(u), r.current = void 0;
|
|
755
|
-
}, []), v = c.useCallback(function(u) {
|
|
756
|
-
l(u.type, be(u), u.target, i(u, e.lockRef.current));
|
|
757
|
-
}, []), h = c.useCallback(function(u) {
|
|
758
|
-
l(u.type, U(u), u.target, i(u, e.lockRef.current));
|
|
759
|
-
}, []);
|
|
760
|
-
c.useEffect(function() {
|
|
761
|
-
return M.push(a), e.setCallbacks({
|
|
762
|
-
onScrollCapture: v,
|
|
763
|
-
onWheelCapture: v,
|
|
764
|
-
onTouchMoveCapture: h
|
|
765
|
-
}), document.addEventListener("wheel", m, I), document.addEventListener("touchmove", m, I), document.addEventListener("touchstart", d, I), function() {
|
|
766
|
-
M = M.filter(function(u) {
|
|
767
|
-
return u !== a;
|
|
768
|
-
}), document.removeEventListener("wheel", m, I), document.removeEventListener("touchmove", m, I), document.removeEventListener("touchstart", d, I);
|
|
769
|
-
};
|
|
770
|
-
}, []);
|
|
771
|
-
var y = e.removeScrollBar, D = e.inert;
|
|
772
|
-
return c.createElement(
|
|
773
|
-
c.Fragment,
|
|
774
|
-
null,
|
|
775
|
-
D ? c.createElement(a, { styles: rn(o) }) : null,
|
|
776
|
-
y ? c.createElement($t, { gapMode: e.gapMode }) : null
|
|
777
|
-
);
|
|
778
|
-
}
|
|
779
|
-
function cn(e) {
|
|
780
|
-
for (var t = null; e !== null; )
|
|
781
|
-
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
782
|
-
return t;
|
|
783
|
-
}
|
|
784
|
-
const sn = _t(Ae, an);
|
|
785
|
-
var Fe = c.forwardRef(function(e, t) {
|
|
786
|
-
return c.createElement(X, P({}, e, { ref: t, sideCar: sn }));
|
|
787
|
-
});
|
|
788
|
-
Fe.classNames = X.classNames;
|
|
789
|
-
var un = function(e) {
|
|
790
|
-
if (typeof document > "u")
|
|
791
|
-
return null;
|
|
792
|
-
var t = Array.isArray(e) ? e[0] : e;
|
|
793
|
-
return t.ownerDocument.body;
|
|
794
|
-
}, _ = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), K = {}, re = 0, ke = function(e) {
|
|
795
|
-
return e && (e.host || ke(e.parentNode));
|
|
796
|
-
}, ln = function(e, t) {
|
|
797
|
-
return t.map(function(n) {
|
|
798
|
-
if (e.contains(n))
|
|
799
|
-
return n;
|
|
800
|
-
var r = ke(n);
|
|
801
|
-
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
802
|
-
}).filter(function(n) {
|
|
803
|
-
return !!n;
|
|
804
|
-
});
|
|
805
|
-
}, dn = function(e, t, n, r) {
|
|
806
|
-
var o = ln(t, Array.isArray(e) ? e : [e]);
|
|
807
|
-
K[n] || (K[n] = /* @__PURE__ */ new WeakMap());
|
|
808
|
-
var a = K[n], s = [], i = /* @__PURE__ */ new Set(), m = new Set(o), l = function(v) {
|
|
809
|
-
!v || i.has(v) || (i.add(v), l(v.parentNode));
|
|
810
|
-
};
|
|
811
|
-
o.forEach(l);
|
|
812
|
-
var d = function(v) {
|
|
813
|
-
!v || m.has(v) || Array.prototype.forEach.call(v.children, function(h) {
|
|
814
|
-
if (i.has(h))
|
|
815
|
-
d(h);
|
|
816
|
-
else
|
|
817
|
-
try {
|
|
818
|
-
var y = h.getAttribute(r), D = y !== null && y !== "false", u = (_.get(h) || 0) + 1, f = (a.get(h) || 0) + 1;
|
|
819
|
-
_.set(h, u), a.set(h, f), s.push(h), u === 1 && D && H.set(h, !0), f === 1 && h.setAttribute(n, "true"), D || h.setAttribute(r, "true");
|
|
820
|
-
} catch (g) {
|
|
821
|
-
console.error("aria-hidden: cannot operate on ", h, g);
|
|
822
|
-
}
|
|
823
|
-
});
|
|
824
|
-
};
|
|
825
|
-
return d(t), i.clear(), re++, function() {
|
|
826
|
-
s.forEach(function(v) {
|
|
827
|
-
var h = _.get(v) - 1, y = a.get(v) - 1;
|
|
828
|
-
_.set(v, h), a.set(v, y), h || (H.has(v) || v.removeAttribute(r), H.delete(v)), y || v.removeAttribute(n);
|
|
829
|
-
}), re--, re || (_ = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), K = {});
|
|
830
|
-
};
|
|
831
|
-
}, fn = function(e, t, n) {
|
|
832
|
-
n === void 0 && (n = "data-aria-hidden");
|
|
833
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), o = un(e);
|
|
834
|
-
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live]"))), dn(r, o, n, "aria-hidden")) : function() {
|
|
835
|
-
return null;
|
|
836
|
-
};
|
|
837
|
-
}, $ = "Dialog", [We, xn] = nt($), [vn, R] = We($), je = (e) => {
|
|
838
|
-
const {
|
|
839
|
-
__scopeDialog: t,
|
|
840
|
-
children: n,
|
|
841
|
-
open: r,
|
|
842
|
-
defaultOpen: o,
|
|
843
|
-
onOpenChange: a,
|
|
844
|
-
modal: s = !0
|
|
845
|
-
} = e, i = c.useRef(null), m = c.useRef(null), [l, d] = ot({
|
|
846
|
-
prop: r,
|
|
847
|
-
defaultProp: o ?? !1,
|
|
848
|
-
onChange: a,
|
|
849
|
-
caller: $
|
|
850
|
-
});
|
|
851
|
-
return /* @__PURE__ */ p.jsx(
|
|
852
|
-
vn,
|
|
853
|
-
{
|
|
854
|
-
scope: t,
|
|
855
|
-
triggerRef: i,
|
|
856
|
-
contentRef: m,
|
|
857
|
-
contentId: Z(),
|
|
858
|
-
titleId: Z(),
|
|
859
|
-
descriptionId: Z(),
|
|
860
|
-
open: l,
|
|
861
|
-
onOpenChange: d,
|
|
862
|
-
onOpenToggle: c.useCallback(() => d((v) => !v), [d]),
|
|
863
|
-
modal: s,
|
|
864
|
-
children: n
|
|
865
|
-
}
|
|
866
|
-
);
|
|
867
|
-
};
|
|
868
|
-
je.displayName = $;
|
|
869
|
-
var Be = "DialogTrigger", Ue = c.forwardRef(
|
|
870
|
-
(e, t) => {
|
|
871
|
-
const { __scopeDialog: n, ...r } = e, o = R(Be, n), a = k(t, o.triggerRef);
|
|
872
|
-
return /* @__PURE__ */ p.jsx(
|
|
873
|
-
T.button,
|
|
874
|
-
{
|
|
875
|
-
type: "button",
|
|
876
|
-
"aria-haspopup": "dialog",
|
|
877
|
-
"aria-expanded": o.open,
|
|
878
|
-
"aria-controls": o.contentId,
|
|
879
|
-
"data-state": ue(o.open),
|
|
880
|
-
...r,
|
|
881
|
-
ref: a,
|
|
882
|
-
onClick: A(e.onClick, o.onOpenToggle)
|
|
883
|
-
}
|
|
884
|
-
);
|
|
885
|
-
}
|
|
886
|
-
);
|
|
887
|
-
Ue.displayName = Be;
|
|
888
|
-
var ce = "DialogPortal", [hn, He] = We(ce, {
|
|
889
|
-
forceMount: void 0
|
|
890
|
-
}), Ke = (e) => {
|
|
891
|
-
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = R(ce, t);
|
|
892
|
-
return /* @__PURE__ */ p.jsx(hn, { scope: t, forceMount: n, children: c.Children.map(r, (s) => /* @__PURE__ */ p.jsx(ie, { present: n || a.open, children: /* @__PURE__ */ p.jsx(xe, { asChild: !0, container: o, children: s }) })) });
|
|
893
|
-
};
|
|
894
|
-
Ke.displayName = ce;
|
|
895
|
-
var Y = "DialogOverlay", Ve = c.forwardRef(
|
|
896
|
-
(e, t) => {
|
|
897
|
-
const n = He(Y, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = R(Y, e.__scopeDialog);
|
|
898
|
-
return a.modal ? /* @__PURE__ */ p.jsx(ie, { present: r || a.open, children: /* @__PURE__ */ p.jsx(pn, { ...o, ref: t }) }) : null;
|
|
899
|
-
}
|
|
900
|
-
);
|
|
901
|
-
Ve.displayName = Y;
|
|
902
|
-
var mn = Se("DialogOverlay.RemoveScroll"), pn = c.forwardRef(
|
|
903
|
-
(e, t) => {
|
|
904
|
-
const { __scopeDialog: n, ...r } = e, o = R(Y, n);
|
|
905
|
-
return (
|
|
906
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
907
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
908
|
-
/* @__PURE__ */ p.jsx(Fe, { as: mn, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ p.jsx(
|
|
909
|
-
T.div,
|
|
910
|
-
{
|
|
911
|
-
"data-state": ue(o.open),
|
|
912
|
-
...r,
|
|
913
|
-
ref: t,
|
|
914
|
-
style: { pointerEvents: "auto", ...r.style }
|
|
915
|
-
}
|
|
916
|
-
) })
|
|
917
|
-
);
|
|
918
|
-
}
|
|
919
|
-
), L = "DialogContent", Ge = c.forwardRef(
|
|
920
|
-
(e, t) => {
|
|
921
|
-
const n = He(L, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = R(L, e.__scopeDialog);
|
|
922
|
-
return /* @__PURE__ */ p.jsx(ie, { present: r || a.open, children: a.modal ? /* @__PURE__ */ p.jsx(gn, { ...o, ref: t }) : /* @__PURE__ */ p.jsx(yn, { ...o, ref: t }) });
|
|
923
|
-
}
|
|
924
|
-
);
|
|
925
|
-
Ge.displayName = L;
|
|
926
|
-
var gn = c.forwardRef(
|
|
927
|
-
(e, t) => {
|
|
928
|
-
const n = R(L, e.__scopeDialog), r = c.useRef(null), o = k(t, n.contentRef, r);
|
|
929
|
-
return c.useEffect(() => {
|
|
930
|
-
const a = r.current;
|
|
931
|
-
if (a) return fn(a);
|
|
932
|
-
}, []), /* @__PURE__ */ p.jsx(
|
|
933
|
-
Ye,
|
|
934
|
-
{
|
|
935
|
-
...e,
|
|
936
|
-
ref: o,
|
|
937
|
-
trapFocus: n.open,
|
|
938
|
-
disableOutsidePointerEvents: !0,
|
|
939
|
-
onCloseAutoFocus: A(e.onCloseAutoFocus, (a) => {
|
|
940
|
-
var s;
|
|
941
|
-
a.preventDefault(), (s = n.triggerRef.current) == null || s.focus();
|
|
942
|
-
}),
|
|
943
|
-
onPointerDownOutside: A(e.onPointerDownOutside, (a) => {
|
|
944
|
-
const s = a.detail.originalEvent, i = s.button === 0 && s.ctrlKey === !0;
|
|
945
|
-
(s.button === 2 || i) && a.preventDefault();
|
|
946
|
-
}),
|
|
947
|
-
onFocusOutside: A(
|
|
948
|
-
e.onFocusOutside,
|
|
949
|
-
(a) => a.preventDefault()
|
|
950
|
-
)
|
|
951
|
-
}
|
|
952
|
-
);
|
|
953
|
-
}
|
|
954
|
-
), yn = c.forwardRef(
|
|
955
|
-
(e, t) => {
|
|
956
|
-
const n = R(L, e.__scopeDialog), r = c.useRef(!1), o = c.useRef(!1);
|
|
957
|
-
return /* @__PURE__ */ p.jsx(
|
|
958
|
-
Ye,
|
|
959
|
-
{
|
|
960
|
-
...e,
|
|
961
|
-
ref: t,
|
|
962
|
-
trapFocus: !1,
|
|
963
|
-
disableOutsidePointerEvents: !1,
|
|
964
|
-
onCloseAutoFocus: (a) => {
|
|
965
|
-
var s, i;
|
|
966
|
-
(s = e.onCloseAutoFocus) == null || s.call(e, a), a.defaultPrevented || (r.current || (i = n.triggerRef.current) == null || i.focus(), a.preventDefault()), r.current = !1, o.current = !1;
|
|
967
|
-
},
|
|
968
|
-
onInteractOutside: (a) => {
|
|
969
|
-
var m, l;
|
|
970
|
-
(m = e.onInteractOutside) == null || m.call(e, a), a.defaultPrevented || (r.current = !0, a.detail.originalEvent.type === "pointerdown" && (o.current = !0));
|
|
971
|
-
const s = a.target;
|
|
972
|
-
((l = n.triggerRef.current) == null ? void 0 : l.contains(s)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && o.current && a.preventDefault();
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
);
|
|
976
|
-
}
|
|
977
|
-
), Ye = c.forwardRef(
|
|
978
|
-
(e, t) => {
|
|
979
|
-
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...s } = e, i = R(L, n), m = c.useRef(null), l = k(t, m);
|
|
980
|
-
return Rt(), /* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
981
|
-
/* @__PURE__ */ p.jsx(
|
|
982
|
-
Pe,
|
|
983
|
-
{
|
|
984
|
-
asChild: !0,
|
|
985
|
-
loop: !0,
|
|
986
|
-
trapped: r,
|
|
987
|
-
onMountAutoFocus: o,
|
|
988
|
-
onUnmountAutoFocus: a,
|
|
989
|
-
children: /* @__PURE__ */ p.jsx(
|
|
990
|
-
De,
|
|
991
|
-
{
|
|
992
|
-
role: "dialog",
|
|
993
|
-
id: i.contentId,
|
|
994
|
-
"aria-describedby": i.descriptionId,
|
|
995
|
-
"aria-labelledby": i.titleId,
|
|
996
|
-
"data-state": ue(i.open),
|
|
997
|
-
...s,
|
|
998
|
-
ref: l,
|
|
999
|
-
onDismiss: () => i.onOpenChange(!1)
|
|
1000
|
-
}
|
|
1001
|
-
)
|
|
1002
|
-
}
|
|
1003
|
-
),
|
|
1004
|
-
/* @__PURE__ */ p.jsxs(p.Fragment, { children: [
|
|
1005
|
-
/* @__PURE__ */ p.jsx(En, { titleId: i.titleId }),
|
|
1006
|
-
/* @__PURE__ */ p.jsx(Cn, { contentRef: m, descriptionId: i.descriptionId })
|
|
1007
|
-
] })
|
|
1008
|
-
] });
|
|
1009
|
-
}
|
|
1010
|
-
), se = "DialogTitle", Xe = c.forwardRef(
|
|
1011
|
-
(e, t) => {
|
|
1012
|
-
const { __scopeDialog: n, ...r } = e, o = R(se, n);
|
|
1013
|
-
return /* @__PURE__ */ p.jsx(T.h2, { id: o.titleId, ...r, ref: t });
|
|
1014
|
-
}
|
|
1015
|
-
);
|
|
1016
|
-
Xe.displayName = se;
|
|
1017
|
-
var $e = "DialogDescription", ze = c.forwardRef(
|
|
1018
|
-
(e, t) => {
|
|
1019
|
-
const { __scopeDialog: n, ...r } = e, o = R($e, n);
|
|
1020
|
-
return /* @__PURE__ */ p.jsx(T.p, { id: o.descriptionId, ...r, ref: t });
|
|
1021
|
-
}
|
|
1022
|
-
);
|
|
1023
|
-
ze.displayName = $e;
|
|
1024
|
-
var Ze = "DialogClose", qe = c.forwardRef(
|
|
1025
|
-
(e, t) => {
|
|
1026
|
-
const { __scopeDialog: n, ...r } = e, o = R(Ze, n);
|
|
1027
|
-
return /* @__PURE__ */ p.jsx(
|
|
1028
|
-
T.button,
|
|
1029
|
-
{
|
|
1030
|
-
type: "button",
|
|
1031
|
-
...r,
|
|
1032
|
-
ref: t,
|
|
1033
|
-
onClick: A(e.onClick, () => o.onOpenChange(!1))
|
|
1034
|
-
}
|
|
1035
|
-
);
|
|
1036
|
-
}
|
|
1037
|
-
);
|
|
1038
|
-
qe.displayName = Ze;
|
|
1039
|
-
function ue(e) {
|
|
1040
|
-
return e ? "open" : "closed";
|
|
1041
|
-
}
|
|
1042
|
-
var Qe = "DialogTitleWarning", [Tn, Je] = rt(Qe, {
|
|
1043
|
-
contentName: L,
|
|
1044
|
-
titleName: se,
|
|
1045
|
-
docsSlug: "dialog"
|
|
1046
|
-
}), En = ({ titleId: e }) => {
|
|
1047
|
-
const t = Je(Qe), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1048
|
-
|
|
1049
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1050
|
-
|
|
1051
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
1052
|
-
return c.useEffect(() => {
|
|
1053
|
-
e && (document.getElementById(e) || console.error(n));
|
|
1054
|
-
}, [n, e]), null;
|
|
1055
|
-
}, bn = "DialogDescriptionWarning", Cn = ({ contentRef: e, descriptionId: t }) => {
|
|
1056
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Je(bn).contentName}}.`;
|
|
1057
|
-
return c.useEffect(() => {
|
|
1058
|
-
var a;
|
|
1059
|
-
const o = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
1060
|
-
t && o && (document.getElementById(t) || console.warn(r));
|
|
1061
|
-
}, [r, e, t]), null;
|
|
1062
|
-
}, Nn = je, An = Ue, Ln = Ke, In = Ve, Mn = Ge, _n = Xe, Fn = ze, kn = qe;
|
|
1063
|
-
export {
|
|
1064
|
-
kn as C,
|
|
1065
|
-
Fn as D,
|
|
1066
|
-
In as O,
|
|
1067
|
-
Ln as P,
|
|
1068
|
-
Nn as R,
|
|
1069
|
-
_n as T,
|
|
1070
|
-
Mn as a,
|
|
1071
|
-
An as b
|
|
1072
|
-
};
|