@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
|
@@ -0,0 +1,734 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { c as O, P as $ } from "./index.Bl_fYP4h.js";
|
|
3
|
+
import { c as J, u as T } from "./index.DLcqcWxM.js";
|
|
4
|
+
import { j as d } from "./jsx-runtime.Drh4NO5G.js";
|
|
5
|
+
import { u as _, a as Pe } from "./index.55uP5Llv.js";
|
|
6
|
+
import * as xe from "react-dom";
|
|
7
|
+
import Re from "react-dom";
|
|
8
|
+
import { R as Oe, h as Se, u as Ne } from "./index.wFBaTsPC.js";
|
|
9
|
+
function _e(e, t) {
|
|
10
|
+
const n = i.createContext(t), o = (s) => {
|
|
11
|
+
const { children: c, ...a } = s, l = i.useMemo(() => a, Object.values(a));
|
|
12
|
+
return /* @__PURE__ */ d.jsx(n.Provider, { value: l, children: c });
|
|
13
|
+
};
|
|
14
|
+
o.displayName = e + "Provider";
|
|
15
|
+
function r(s) {
|
|
16
|
+
const c = i.useContext(n);
|
|
17
|
+
if (c) return c;
|
|
18
|
+
if (t !== void 0) return t;
|
|
19
|
+
throw new Error(`\`${s}\` must be used within \`${e}\``);
|
|
20
|
+
}
|
|
21
|
+
return [o, r];
|
|
22
|
+
}
|
|
23
|
+
function Te(e, t = []) {
|
|
24
|
+
let n = [];
|
|
25
|
+
function o(s, c) {
|
|
26
|
+
const a = i.createContext(c), l = n.length;
|
|
27
|
+
n = [...n, c];
|
|
28
|
+
const u = (v) => {
|
|
29
|
+
var E;
|
|
30
|
+
const { scope: g, children: h, ...D } = v, p = ((E = g == null ? void 0 : g[e]) == null ? void 0 : E[l]) || a, P = i.useMemo(() => D, Object.values(D));
|
|
31
|
+
return /* @__PURE__ */ d.jsx(p.Provider, { value: P, children: h });
|
|
32
|
+
};
|
|
33
|
+
u.displayName = s + "Provider";
|
|
34
|
+
function f(v, g) {
|
|
35
|
+
var p;
|
|
36
|
+
const h = ((p = g == null ? void 0 : g[e]) == null ? void 0 : p[l]) || a, D = i.useContext(h);
|
|
37
|
+
if (D) return D;
|
|
38
|
+
if (c !== void 0) return c;
|
|
39
|
+
throw new Error(`\`${v}\` must be used within \`${s}\``);
|
|
40
|
+
}
|
|
41
|
+
return [u, f];
|
|
42
|
+
}
|
|
43
|
+
const r = () => {
|
|
44
|
+
const s = n.map((c) => i.createContext(c));
|
|
45
|
+
return function(a) {
|
|
46
|
+
const l = (a == null ? void 0 : a[e]) || s;
|
|
47
|
+
return i.useMemo(
|
|
48
|
+
() => ({ [`__scope${e}`]: { ...a, [e]: l } }),
|
|
49
|
+
[a, l]
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
return r.scopeName = e, [o, we(r, ...t)];
|
|
54
|
+
}
|
|
55
|
+
function we(...e) {
|
|
56
|
+
const t = e[0];
|
|
57
|
+
if (e.length === 1) return t;
|
|
58
|
+
const n = () => {
|
|
59
|
+
const o = e.map((r) => ({
|
|
60
|
+
useScope: r(),
|
|
61
|
+
scopeName: r.scopeName
|
|
62
|
+
}));
|
|
63
|
+
return function(s) {
|
|
64
|
+
const c = o.reduce((a, { useScope: l, scopeName: u }) => {
|
|
65
|
+
const v = l(s)[`__scope${u}`];
|
|
66
|
+
return { ...a, ...v };
|
|
67
|
+
}, {});
|
|
68
|
+
return i.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
return n.scopeName = t.scopeName, n;
|
|
72
|
+
}
|
|
73
|
+
var Q = globalThis != null && globalThis.document ? i.useLayoutEffect : () => {
|
|
74
|
+
}, Ie = i.useId || (() => {
|
|
75
|
+
}), Fe = 0;
|
|
76
|
+
function L(e) {
|
|
77
|
+
const [t, n] = i.useState(Ie());
|
|
78
|
+
return Q(() => {
|
|
79
|
+
n((o) => o ?? String(Fe++));
|
|
80
|
+
}, [e]), e || (t ? `radix-${t}` : "");
|
|
81
|
+
}
|
|
82
|
+
function Ae({
|
|
83
|
+
prop: e,
|
|
84
|
+
defaultProp: t,
|
|
85
|
+
onChange: n = () => {
|
|
86
|
+
}
|
|
87
|
+
}) {
|
|
88
|
+
const [o, r] = Le({ defaultProp: t, onChange: n }), s = e !== void 0, c = s ? e : o, a = _(n), l = i.useCallback(
|
|
89
|
+
(u) => {
|
|
90
|
+
if (s) {
|
|
91
|
+
const v = typeof u == "function" ? u(e) : u;
|
|
92
|
+
v !== e && a(v);
|
|
93
|
+
} else
|
|
94
|
+
r(u);
|
|
95
|
+
},
|
|
96
|
+
[s, e, r, a]
|
|
97
|
+
);
|
|
98
|
+
return [c, l];
|
|
99
|
+
}
|
|
100
|
+
function Le({
|
|
101
|
+
defaultProp: e,
|
|
102
|
+
onChange: t
|
|
103
|
+
}) {
|
|
104
|
+
const n = i.useState(e), [o] = n, r = i.useRef(o), s = _(t);
|
|
105
|
+
return i.useEffect(() => {
|
|
106
|
+
r.current !== o && (s(o), r.current = o);
|
|
107
|
+
}, [o, r, s]), n;
|
|
108
|
+
}
|
|
109
|
+
// @__NO_SIDE_EFFECTS__
|
|
110
|
+
function ee(e) {
|
|
111
|
+
const t = /* @__PURE__ */ je(e), n = i.forwardRef((o, r) => {
|
|
112
|
+
const { children: s, ...c } = o, a = i.Children.toArray(s), l = a.find(We);
|
|
113
|
+
if (l) {
|
|
114
|
+
const u = l.props.children, f = a.map((v) => v === l ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : v);
|
|
115
|
+
return /* @__PURE__ */ d.jsx(t, { ...c, ref: r, children: i.isValidElement(u) ? i.cloneElement(u, void 0, f) : null });
|
|
116
|
+
}
|
|
117
|
+
return /* @__PURE__ */ d.jsx(t, { ...c, ref: r, children: s });
|
|
118
|
+
});
|
|
119
|
+
return n.displayName = `${e}.Slot`, n;
|
|
120
|
+
}
|
|
121
|
+
// @__NO_SIDE_EFFECTS__
|
|
122
|
+
function je(e) {
|
|
123
|
+
const t = i.forwardRef((n, o) => {
|
|
124
|
+
const { children: r, ...s } = n;
|
|
125
|
+
if (i.isValidElement(r)) {
|
|
126
|
+
const c = ke(r), a = $e(s, r.props);
|
|
127
|
+
return r.type !== i.Fragment && (a.ref = o ? J(o, c) : c), i.cloneElement(r, a);
|
|
128
|
+
}
|
|
129
|
+
return i.Children.count(r) > 1 ? i.Children.only(null) : null;
|
|
130
|
+
});
|
|
131
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
132
|
+
}
|
|
133
|
+
var Me = Symbol("radix.slottable");
|
|
134
|
+
function We(e) {
|
|
135
|
+
return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Me;
|
|
136
|
+
}
|
|
137
|
+
function $e(e, t) {
|
|
138
|
+
const n = { ...t };
|
|
139
|
+
for (const o in t) {
|
|
140
|
+
const r = e[o], s = t[o];
|
|
141
|
+
/^on[A-Z]/.test(o) ? r && s ? n[o] = (...a) => {
|
|
142
|
+
s(...a), r(...a);
|
|
143
|
+
} : r && (n[o] = r) : o === "style" ? n[o] = { ...r, ...s } : o === "className" && (n[o] = [r, s].filter(Boolean).join(" "));
|
|
144
|
+
}
|
|
145
|
+
return { ...e, ...n };
|
|
146
|
+
}
|
|
147
|
+
function ke(e) {
|
|
148
|
+
var o, r;
|
|
149
|
+
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
150
|
+
return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
151
|
+
}
|
|
152
|
+
var Be = [
|
|
153
|
+
"a",
|
|
154
|
+
"button",
|
|
155
|
+
"div",
|
|
156
|
+
"form",
|
|
157
|
+
"h2",
|
|
158
|
+
"h3",
|
|
159
|
+
"img",
|
|
160
|
+
"input",
|
|
161
|
+
"label",
|
|
162
|
+
"li",
|
|
163
|
+
"nav",
|
|
164
|
+
"ol",
|
|
165
|
+
"p",
|
|
166
|
+
"select",
|
|
167
|
+
"span",
|
|
168
|
+
"svg",
|
|
169
|
+
"ul"
|
|
170
|
+
], S = Be.reduce((e, t) => {
|
|
171
|
+
const n = /* @__PURE__ */ ee(`Primitive.${t}`), o = i.forwardRef((r, s) => {
|
|
172
|
+
const { asChild: c, ...a } = r, l = c ? n : t;
|
|
173
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d.jsx(l, { ...a, ref: s });
|
|
174
|
+
});
|
|
175
|
+
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
176
|
+
}, {});
|
|
177
|
+
function Ue(e, t) {
|
|
178
|
+
e && xe.flushSync(() => e.dispatchEvent(t));
|
|
179
|
+
}
|
|
180
|
+
var Ve = "DismissableLayer", W = "dismissableLayer.update", He = "dismissableLayer.pointerDownOutside", Ke = "dismissableLayer.focusOutside", G, te = i.createContext({
|
|
181
|
+
layers: /* @__PURE__ */ new Set(),
|
|
182
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
183
|
+
branches: /* @__PURE__ */ new Set()
|
|
184
|
+
}), ne = i.forwardRef(
|
|
185
|
+
(e, t) => {
|
|
186
|
+
const {
|
|
187
|
+
disableOutsidePointerEvents: n = !1,
|
|
188
|
+
onEscapeKeyDown: o,
|
|
189
|
+
onPointerDownOutside: r,
|
|
190
|
+
onFocusOutside: s,
|
|
191
|
+
onInteractOutside: c,
|
|
192
|
+
onDismiss: a,
|
|
193
|
+
...l
|
|
194
|
+
} = e, u = i.useContext(te), [f, v] = i.useState(null), g = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = i.useState({}), D = T(t, (m) => v(m)), p = Array.from(u.layers), [P] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), E = p.indexOf(P), x = f ? p.indexOf(f) : -1, C = u.layersWithOutsidePointerEventsDisabled.size > 0, y = x >= E, w = Ze((m) => {
|
|
195
|
+
const I = m.target, K = [...u.branches].some((A) => A.contains(I));
|
|
196
|
+
!y || K || (r == null || r(m), c == null || c(m), m.defaultPrevented || a == null || a());
|
|
197
|
+
}, g), H = Ye((m) => {
|
|
198
|
+
const I = m.target;
|
|
199
|
+
[...u.branches].some((A) => A.contains(I)) || (s == null || s(m), c == null || c(m), m.defaultPrevented || a == null || a());
|
|
200
|
+
}, g);
|
|
201
|
+
return Pe((m) => {
|
|
202
|
+
x === u.layers.size - 1 && (o == null || o(m), !m.defaultPrevented && a && (m.preventDefault(), a()));
|
|
203
|
+
}, g), i.useEffect(() => {
|
|
204
|
+
if (f)
|
|
205
|
+
return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (G = g.body.style.pointerEvents, g.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(f)), u.layers.add(f), z(), () => {
|
|
206
|
+
n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (g.body.style.pointerEvents = G);
|
|
207
|
+
};
|
|
208
|
+
}, [f, g, n, u]), i.useEffect(() => () => {
|
|
209
|
+
f && (u.layers.delete(f), u.layersWithOutsidePointerEventsDisabled.delete(f), z());
|
|
210
|
+
}, [f, u]), i.useEffect(() => {
|
|
211
|
+
const m = () => h({});
|
|
212
|
+
return document.addEventListener(W, m), () => document.removeEventListener(W, m);
|
|
213
|
+
}, []), /* @__PURE__ */ d.jsx(
|
|
214
|
+
S.div,
|
|
215
|
+
{
|
|
216
|
+
...l,
|
|
217
|
+
ref: D,
|
|
218
|
+
style: {
|
|
219
|
+
pointerEvents: C ? y ? "auto" : "none" : void 0,
|
|
220
|
+
...e.style
|
|
221
|
+
},
|
|
222
|
+
onFocusCapture: O(e.onFocusCapture, H.onFocusCapture),
|
|
223
|
+
onBlurCapture: O(e.onBlurCapture, H.onBlurCapture),
|
|
224
|
+
onPointerDownCapture: O(
|
|
225
|
+
e.onPointerDownCapture,
|
|
226
|
+
w.onPointerDownCapture
|
|
227
|
+
)
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
);
|
|
232
|
+
ne.displayName = Ve;
|
|
233
|
+
var Ge = "DismissableLayerBranch", ze = i.forwardRef((e, t) => {
|
|
234
|
+
const n = i.useContext(te), o = i.useRef(null), r = T(t, o);
|
|
235
|
+
return i.useEffect(() => {
|
|
236
|
+
const s = o.current;
|
|
237
|
+
if (s)
|
|
238
|
+
return n.branches.add(s), () => {
|
|
239
|
+
n.branches.delete(s);
|
|
240
|
+
};
|
|
241
|
+
}, [n.branches]), /* @__PURE__ */ d.jsx(S.div, { ...e, ref: r });
|
|
242
|
+
});
|
|
243
|
+
ze.displayName = Ge;
|
|
244
|
+
function Ze(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
245
|
+
const n = _(e), o = i.useRef(!1), r = i.useRef(() => {
|
|
246
|
+
});
|
|
247
|
+
return i.useEffect(() => {
|
|
248
|
+
const s = (a) => {
|
|
249
|
+
if (a.target && !o.current) {
|
|
250
|
+
let l = function() {
|
|
251
|
+
oe(
|
|
252
|
+
He,
|
|
253
|
+
n,
|
|
254
|
+
u,
|
|
255
|
+
{ discrete: !0 }
|
|
256
|
+
);
|
|
257
|
+
};
|
|
258
|
+
const u = { originalEvent: a };
|
|
259
|
+
a.pointerType === "touch" ? (t.removeEventListener("click", r.current), r.current = l, t.addEventListener("click", r.current, { once: !0 })) : l();
|
|
260
|
+
} else
|
|
261
|
+
t.removeEventListener("click", r.current);
|
|
262
|
+
o.current = !1;
|
|
263
|
+
}, c = window.setTimeout(() => {
|
|
264
|
+
t.addEventListener("pointerdown", s);
|
|
265
|
+
}, 0);
|
|
266
|
+
return () => {
|
|
267
|
+
window.clearTimeout(c), t.removeEventListener("pointerdown", s), t.removeEventListener("click", r.current);
|
|
268
|
+
};
|
|
269
|
+
}, [t, n]), {
|
|
270
|
+
// ensures we check React component tree (not just DOM tree)
|
|
271
|
+
onPointerDownCapture: () => o.current = !0
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
function Ye(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
275
|
+
const n = _(e), o = i.useRef(!1);
|
|
276
|
+
return i.useEffect(() => {
|
|
277
|
+
const r = (s) => {
|
|
278
|
+
s.target && !o.current && oe(Ke, n, { originalEvent: s }, {
|
|
279
|
+
discrete: !1
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
return t.addEventListener("focusin", r), () => t.removeEventListener("focusin", r);
|
|
283
|
+
}, [t, n]), {
|
|
284
|
+
onFocusCapture: () => o.current = !0,
|
|
285
|
+
onBlurCapture: () => o.current = !1
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
function z() {
|
|
289
|
+
const e = new CustomEvent(W);
|
|
290
|
+
document.dispatchEvent(e);
|
|
291
|
+
}
|
|
292
|
+
function oe(e, t, n, { discrete: o }) {
|
|
293
|
+
const r = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
294
|
+
t && r.addEventListener(e, t, { once: !0 }), o ? Ue(r, s) : r.dispatchEvent(s);
|
|
295
|
+
}
|
|
296
|
+
// @__NO_SIDE_EFFECTS__
|
|
297
|
+
function qe(e) {
|
|
298
|
+
const t = /* @__PURE__ */ Xe(e), n = i.forwardRef((o, r) => {
|
|
299
|
+
const { children: s, ...c } = o, a = i.Children.toArray(s), l = a.find(Qe);
|
|
300
|
+
if (l) {
|
|
301
|
+
const u = l.props.children, f = a.map((v) => v === l ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : v);
|
|
302
|
+
return /* @__PURE__ */ d.jsx(t, { ...c, ref: r, children: i.isValidElement(u) ? i.cloneElement(u, void 0, f) : null });
|
|
303
|
+
}
|
|
304
|
+
return /* @__PURE__ */ d.jsx(t, { ...c, ref: r, children: s });
|
|
305
|
+
});
|
|
306
|
+
return n.displayName = `${e}.Slot`, n;
|
|
307
|
+
}
|
|
308
|
+
// @__NO_SIDE_EFFECTS__
|
|
309
|
+
function Xe(e) {
|
|
310
|
+
const t = i.forwardRef((n, o) => {
|
|
311
|
+
const { children: r, ...s } = n;
|
|
312
|
+
if (i.isValidElement(r)) {
|
|
313
|
+
const c = tt(r), a = et(s, r.props);
|
|
314
|
+
return r.type !== i.Fragment && (a.ref = o ? J(o, c) : c), i.cloneElement(r, a);
|
|
315
|
+
}
|
|
316
|
+
return i.Children.count(r) > 1 ? i.Children.only(null) : null;
|
|
317
|
+
});
|
|
318
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
319
|
+
}
|
|
320
|
+
var Je = Symbol("radix.slottable");
|
|
321
|
+
function Qe(e) {
|
|
322
|
+
return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Je;
|
|
323
|
+
}
|
|
324
|
+
function et(e, t) {
|
|
325
|
+
const n = { ...t };
|
|
326
|
+
for (const o in t) {
|
|
327
|
+
const r = e[o], s = t[o];
|
|
328
|
+
/^on[A-Z]/.test(o) ? r && s ? n[o] = (...a) => {
|
|
329
|
+
s(...a), r(...a);
|
|
330
|
+
} : r && (n[o] = r) : o === "style" ? n[o] = { ...r, ...s } : o === "className" && (n[o] = [r, s].filter(Boolean).join(" "));
|
|
331
|
+
}
|
|
332
|
+
return { ...e, ...n };
|
|
333
|
+
}
|
|
334
|
+
function tt(e) {
|
|
335
|
+
var o, r;
|
|
336
|
+
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
337
|
+
return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
338
|
+
}
|
|
339
|
+
var nt = [
|
|
340
|
+
"a",
|
|
341
|
+
"button",
|
|
342
|
+
"div",
|
|
343
|
+
"form",
|
|
344
|
+
"h2",
|
|
345
|
+
"h3",
|
|
346
|
+
"img",
|
|
347
|
+
"input",
|
|
348
|
+
"label",
|
|
349
|
+
"li",
|
|
350
|
+
"nav",
|
|
351
|
+
"ol",
|
|
352
|
+
"p",
|
|
353
|
+
"select",
|
|
354
|
+
"span",
|
|
355
|
+
"svg",
|
|
356
|
+
"ul"
|
|
357
|
+
], ot = nt.reduce((e, t) => {
|
|
358
|
+
const n = /* @__PURE__ */ qe(`Primitive.${t}`), o = i.forwardRef((r, s) => {
|
|
359
|
+
const { asChild: c, ...a } = r, l = c ? n : t;
|
|
360
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d.jsx(l, { ...a, ref: s });
|
|
361
|
+
});
|
|
362
|
+
return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
|
|
363
|
+
}, {}), j = "focusScope.autoFocusOnMount", M = "focusScope.autoFocusOnUnmount", Z = { bubbles: !1, cancelable: !0 }, rt = "FocusScope", re = i.forwardRef((e, t) => {
|
|
364
|
+
const {
|
|
365
|
+
loop: n = !1,
|
|
366
|
+
trapped: o = !1,
|
|
367
|
+
onMountAutoFocus: r,
|
|
368
|
+
onUnmountAutoFocus: s,
|
|
369
|
+
...c
|
|
370
|
+
} = e, [a, l] = i.useState(null), u = _(r), f = _(s), v = i.useRef(null), g = T(t, (p) => l(p)), h = i.useRef({
|
|
371
|
+
paused: !1,
|
|
372
|
+
pause() {
|
|
373
|
+
this.paused = !0;
|
|
374
|
+
},
|
|
375
|
+
resume() {
|
|
376
|
+
this.paused = !1;
|
|
377
|
+
}
|
|
378
|
+
}).current;
|
|
379
|
+
i.useEffect(() => {
|
|
380
|
+
if (o) {
|
|
381
|
+
let p = function(C) {
|
|
382
|
+
if (h.paused || !a) return;
|
|
383
|
+
const y = C.target;
|
|
384
|
+
a.contains(y) ? v.current = y : R(v.current, { select: !0 });
|
|
385
|
+
}, P = function(C) {
|
|
386
|
+
if (h.paused || !a) return;
|
|
387
|
+
const y = C.relatedTarget;
|
|
388
|
+
y !== null && (a.contains(y) || R(v.current, { select: !0 }));
|
|
389
|
+
}, E = function(C) {
|
|
390
|
+
if (document.activeElement === document.body)
|
|
391
|
+
for (const w of C)
|
|
392
|
+
w.removedNodes.length > 0 && R(a);
|
|
393
|
+
};
|
|
394
|
+
document.addEventListener("focusin", p), document.addEventListener("focusout", P);
|
|
395
|
+
const x = new MutationObserver(E);
|
|
396
|
+
return a && x.observe(a, { childList: !0, subtree: !0 }), () => {
|
|
397
|
+
document.removeEventListener("focusin", p), document.removeEventListener("focusout", P), x.disconnect();
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
}, [o, a, h.paused]), i.useEffect(() => {
|
|
401
|
+
if (a) {
|
|
402
|
+
q.add(h);
|
|
403
|
+
const p = document.activeElement;
|
|
404
|
+
if (!a.contains(p)) {
|
|
405
|
+
const E = new CustomEvent(j, Z);
|
|
406
|
+
a.addEventListener(j, u), a.dispatchEvent(E), E.defaultPrevented || (st(lt(se(a)), { select: !0 }), document.activeElement === p && R(a));
|
|
407
|
+
}
|
|
408
|
+
return () => {
|
|
409
|
+
a.removeEventListener(j, u), setTimeout(() => {
|
|
410
|
+
const E = new CustomEvent(M, Z);
|
|
411
|
+
a.addEventListener(M, f), a.dispatchEvent(E), E.defaultPrevented || R(p ?? document.body, { select: !0 }), a.removeEventListener(M, f), q.remove(h);
|
|
412
|
+
}, 0);
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
}, [a, u, f, h]);
|
|
416
|
+
const D = i.useCallback(
|
|
417
|
+
(p) => {
|
|
418
|
+
if (!n && !o || h.paused) return;
|
|
419
|
+
const P = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, E = document.activeElement;
|
|
420
|
+
if (P && E) {
|
|
421
|
+
const x = p.currentTarget, [C, y] = it(x);
|
|
422
|
+
C && y ? !p.shiftKey && E === y ? (p.preventDefault(), n && R(C, { select: !0 })) : p.shiftKey && E === C && (p.preventDefault(), n && R(y, { select: !0 })) : E === x && p.preventDefault();
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
[n, o, h.paused]
|
|
426
|
+
);
|
|
427
|
+
return /* @__PURE__ */ d.jsx(ot.div, { tabIndex: -1, ...c, ref: g, onKeyDown: D });
|
|
428
|
+
});
|
|
429
|
+
re.displayName = rt;
|
|
430
|
+
function st(e, { select: t = !1 } = {}) {
|
|
431
|
+
const n = document.activeElement;
|
|
432
|
+
for (const o of e)
|
|
433
|
+
if (R(o, { select: t }), document.activeElement !== n) return;
|
|
434
|
+
}
|
|
435
|
+
function it(e) {
|
|
436
|
+
const t = se(e), n = Y(t, e), o = Y(t.reverse(), e);
|
|
437
|
+
return [n, o];
|
|
438
|
+
}
|
|
439
|
+
function se(e) {
|
|
440
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
441
|
+
acceptNode: (o) => {
|
|
442
|
+
const r = o.tagName === "INPUT" && o.type === "hidden";
|
|
443
|
+
return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
447
|
+
return t;
|
|
448
|
+
}
|
|
449
|
+
function Y(e, t) {
|
|
450
|
+
for (const n of e)
|
|
451
|
+
if (!at(n, { upTo: t })) return n;
|
|
452
|
+
}
|
|
453
|
+
function at(e, { upTo: t }) {
|
|
454
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
455
|
+
for (; e; ) {
|
|
456
|
+
if (t !== void 0 && e === t) return !1;
|
|
457
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
458
|
+
e = e.parentElement;
|
|
459
|
+
}
|
|
460
|
+
return !1;
|
|
461
|
+
}
|
|
462
|
+
function ct(e) {
|
|
463
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
464
|
+
}
|
|
465
|
+
function R(e, { select: t = !1 } = {}) {
|
|
466
|
+
if (e && e.focus) {
|
|
467
|
+
const n = document.activeElement;
|
|
468
|
+
e.focus({ preventScroll: !0 }), e !== n && ct(e) && t && e.select();
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
var q = ut();
|
|
472
|
+
function ut() {
|
|
473
|
+
let e = [];
|
|
474
|
+
return {
|
|
475
|
+
add(t) {
|
|
476
|
+
const n = e[0];
|
|
477
|
+
t !== n && (n == null || n.pause()), e = X(e, t), e.unshift(t);
|
|
478
|
+
},
|
|
479
|
+
remove(t) {
|
|
480
|
+
var n;
|
|
481
|
+
e = X(e, t), (n = e[0]) == null || n.resume();
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
function X(e, t) {
|
|
486
|
+
const n = [...e], o = n.indexOf(t);
|
|
487
|
+
return o !== -1 && n.splice(o, 1), n;
|
|
488
|
+
}
|
|
489
|
+
function lt(e) {
|
|
490
|
+
return e.filter((t) => t.tagName !== "A");
|
|
491
|
+
}
|
|
492
|
+
var dt = "Portal", ie = i.forwardRef((e, t) => {
|
|
493
|
+
var a;
|
|
494
|
+
const { container: n, ...o } = e, [r, s] = i.useState(!1);
|
|
495
|
+
Q(() => s(!0), []);
|
|
496
|
+
const c = n || r && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
|
|
497
|
+
return c ? Re.createPortal(/* @__PURE__ */ d.jsx(S.div, { ...o, ref: t }), c) : null;
|
|
498
|
+
});
|
|
499
|
+
ie.displayName = dt;
|
|
500
|
+
var k = "Dialog", [ae, St] = Te(k), [ft, b] = ae(k), ce = (e) => {
|
|
501
|
+
const {
|
|
502
|
+
__scopeDialog: t,
|
|
503
|
+
children: n,
|
|
504
|
+
open: o,
|
|
505
|
+
defaultOpen: r,
|
|
506
|
+
onOpenChange: s,
|
|
507
|
+
modal: c = !0
|
|
508
|
+
} = e, a = i.useRef(null), l = i.useRef(null), [u, f] = Ae({
|
|
509
|
+
prop: o,
|
|
510
|
+
defaultProp: r ?? !1,
|
|
511
|
+
onChange: s
|
|
512
|
+
});
|
|
513
|
+
return /* @__PURE__ */ d.jsx(
|
|
514
|
+
ft,
|
|
515
|
+
{
|
|
516
|
+
scope: t,
|
|
517
|
+
triggerRef: a,
|
|
518
|
+
contentRef: l,
|
|
519
|
+
contentId: L(),
|
|
520
|
+
titleId: L(),
|
|
521
|
+
descriptionId: L(),
|
|
522
|
+
open: u,
|
|
523
|
+
onOpenChange: f,
|
|
524
|
+
onOpenToggle: i.useCallback(() => f((v) => !v), [f]),
|
|
525
|
+
modal: c,
|
|
526
|
+
children: n
|
|
527
|
+
}
|
|
528
|
+
);
|
|
529
|
+
};
|
|
530
|
+
ce.displayName = k;
|
|
531
|
+
var ue = "DialogTrigger", le = i.forwardRef(
|
|
532
|
+
(e, t) => {
|
|
533
|
+
const { __scopeDialog: n, ...o } = e, r = b(ue, n), s = T(t, r.triggerRef);
|
|
534
|
+
return /* @__PURE__ */ d.jsx(
|
|
535
|
+
S.button,
|
|
536
|
+
{
|
|
537
|
+
type: "button",
|
|
538
|
+
"aria-haspopup": "dialog",
|
|
539
|
+
"aria-expanded": r.open,
|
|
540
|
+
"aria-controls": r.contentId,
|
|
541
|
+
"data-state": V(r.open),
|
|
542
|
+
...o,
|
|
543
|
+
ref: s,
|
|
544
|
+
onClick: O(e.onClick, r.onOpenToggle)
|
|
545
|
+
}
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
);
|
|
549
|
+
le.displayName = ue;
|
|
550
|
+
var B = "DialogPortal", [pt, de] = ae(B, {
|
|
551
|
+
forceMount: void 0
|
|
552
|
+
}), fe = (e) => {
|
|
553
|
+
const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, s = b(B, t);
|
|
554
|
+
return /* @__PURE__ */ d.jsx(pt, { scope: t, forceMount: n, children: i.Children.map(o, (c) => /* @__PURE__ */ d.jsx($, { present: n || s.open, children: /* @__PURE__ */ d.jsx(ie, { asChild: !0, container: r, children: c }) })) });
|
|
555
|
+
};
|
|
556
|
+
fe.displayName = B;
|
|
557
|
+
var F = "DialogOverlay", pe = i.forwardRef(
|
|
558
|
+
(e, t) => {
|
|
559
|
+
const n = de(F, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, s = b(F, e.__scopeDialog);
|
|
560
|
+
return s.modal ? /* @__PURE__ */ d.jsx($, { present: o || s.open, children: /* @__PURE__ */ d.jsx(mt, { ...r, ref: t }) }) : null;
|
|
561
|
+
}
|
|
562
|
+
);
|
|
563
|
+
pe.displayName = F;
|
|
564
|
+
var vt = /* @__PURE__ */ ee("DialogOverlay.RemoveScroll"), mt = i.forwardRef(
|
|
565
|
+
(e, t) => {
|
|
566
|
+
const { __scopeDialog: n, ...o } = e, r = b(F, n);
|
|
567
|
+
return (
|
|
568
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
569
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
570
|
+
/* @__PURE__ */ d.jsx(Oe, { as: vt, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ d.jsx(
|
|
571
|
+
S.div,
|
|
572
|
+
{
|
|
573
|
+
"data-state": V(r.open),
|
|
574
|
+
...o,
|
|
575
|
+
ref: t,
|
|
576
|
+
style: { pointerEvents: "auto", ...o.style }
|
|
577
|
+
}
|
|
578
|
+
) })
|
|
579
|
+
);
|
|
580
|
+
}
|
|
581
|
+
), N = "DialogContent", ve = i.forwardRef(
|
|
582
|
+
(e, t) => {
|
|
583
|
+
const n = de(N, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, s = b(N, e.__scopeDialog);
|
|
584
|
+
return /* @__PURE__ */ d.jsx($, { present: o || s.open, children: s.modal ? /* @__PURE__ */ d.jsx(gt, { ...r, ref: t }) : /* @__PURE__ */ d.jsx(Et, { ...r, ref: t }) });
|
|
585
|
+
}
|
|
586
|
+
);
|
|
587
|
+
ve.displayName = N;
|
|
588
|
+
var gt = i.forwardRef(
|
|
589
|
+
(e, t) => {
|
|
590
|
+
const n = b(N, e.__scopeDialog), o = i.useRef(null), r = T(t, n.contentRef, o);
|
|
591
|
+
return i.useEffect(() => {
|
|
592
|
+
const s = o.current;
|
|
593
|
+
if (s) return Se(s);
|
|
594
|
+
}, []), /* @__PURE__ */ d.jsx(
|
|
595
|
+
me,
|
|
596
|
+
{
|
|
597
|
+
...e,
|
|
598
|
+
ref: r,
|
|
599
|
+
trapFocus: n.open,
|
|
600
|
+
disableOutsidePointerEvents: !0,
|
|
601
|
+
onCloseAutoFocus: O(e.onCloseAutoFocus, (s) => {
|
|
602
|
+
var c;
|
|
603
|
+
s.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
|
|
604
|
+
}),
|
|
605
|
+
onPointerDownOutside: O(e.onPointerDownOutside, (s) => {
|
|
606
|
+
const c = s.detail.originalEvent, a = c.button === 0 && c.ctrlKey === !0;
|
|
607
|
+
(c.button === 2 || a) && s.preventDefault();
|
|
608
|
+
}),
|
|
609
|
+
onFocusOutside: O(
|
|
610
|
+
e.onFocusOutside,
|
|
611
|
+
(s) => s.preventDefault()
|
|
612
|
+
)
|
|
613
|
+
}
|
|
614
|
+
);
|
|
615
|
+
}
|
|
616
|
+
), Et = i.forwardRef(
|
|
617
|
+
(e, t) => {
|
|
618
|
+
const n = b(N, e.__scopeDialog), o = i.useRef(!1), r = i.useRef(!1);
|
|
619
|
+
return /* @__PURE__ */ d.jsx(
|
|
620
|
+
me,
|
|
621
|
+
{
|
|
622
|
+
...e,
|
|
623
|
+
ref: t,
|
|
624
|
+
trapFocus: !1,
|
|
625
|
+
disableOutsidePointerEvents: !1,
|
|
626
|
+
onCloseAutoFocus: (s) => {
|
|
627
|
+
var c, a;
|
|
628
|
+
(c = e.onCloseAutoFocus) == null || c.call(e, s), s.defaultPrevented || (o.current || (a = n.triggerRef.current) == null || a.focus(), s.preventDefault()), o.current = !1, r.current = !1;
|
|
629
|
+
},
|
|
630
|
+
onInteractOutside: (s) => {
|
|
631
|
+
var l, u;
|
|
632
|
+
(l = e.onInteractOutside) == null || l.call(e, s), s.defaultPrevented || (o.current = !0, s.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
633
|
+
const c = s.target;
|
|
634
|
+
((u = n.triggerRef.current) == null ? void 0 : u.contains(c)) && s.preventDefault(), s.detail.originalEvent.type === "focusin" && r.current && s.preventDefault();
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
), me = i.forwardRef(
|
|
640
|
+
(e, t) => {
|
|
641
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: s, ...c } = e, a = b(N, n), l = i.useRef(null), u = T(t, l);
|
|
642
|
+
return Ne(), /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
643
|
+
/* @__PURE__ */ d.jsx(
|
|
644
|
+
re,
|
|
645
|
+
{
|
|
646
|
+
asChild: !0,
|
|
647
|
+
loop: !0,
|
|
648
|
+
trapped: o,
|
|
649
|
+
onMountAutoFocus: r,
|
|
650
|
+
onUnmountAutoFocus: s,
|
|
651
|
+
children: /* @__PURE__ */ d.jsx(
|
|
652
|
+
ne,
|
|
653
|
+
{
|
|
654
|
+
role: "dialog",
|
|
655
|
+
id: a.contentId,
|
|
656
|
+
"aria-describedby": a.descriptionId,
|
|
657
|
+
"aria-labelledby": a.titleId,
|
|
658
|
+
"data-state": V(a.open),
|
|
659
|
+
...c,
|
|
660
|
+
ref: u,
|
|
661
|
+
onDismiss: () => a.onOpenChange(!1)
|
|
662
|
+
}
|
|
663
|
+
)
|
|
664
|
+
}
|
|
665
|
+
),
|
|
666
|
+
/* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
667
|
+
/* @__PURE__ */ d.jsx(ht, { titleId: a.titleId }),
|
|
668
|
+
/* @__PURE__ */ d.jsx(Ct, { contentRef: l, descriptionId: a.descriptionId })
|
|
669
|
+
] })
|
|
670
|
+
] });
|
|
671
|
+
}
|
|
672
|
+
), U = "DialogTitle", ge = i.forwardRef(
|
|
673
|
+
(e, t) => {
|
|
674
|
+
const { __scopeDialog: n, ...o } = e, r = b(U, n);
|
|
675
|
+
return /* @__PURE__ */ d.jsx(S.h2, { id: r.titleId, ...o, ref: t });
|
|
676
|
+
}
|
|
677
|
+
);
|
|
678
|
+
ge.displayName = U;
|
|
679
|
+
var Ee = "DialogDescription", he = i.forwardRef(
|
|
680
|
+
(e, t) => {
|
|
681
|
+
const { __scopeDialog: n, ...o } = e, r = b(Ee, n);
|
|
682
|
+
return /* @__PURE__ */ d.jsx(S.p, { id: r.descriptionId, ...o, ref: t });
|
|
683
|
+
}
|
|
684
|
+
);
|
|
685
|
+
he.displayName = Ee;
|
|
686
|
+
var ye = "DialogClose", Ce = i.forwardRef(
|
|
687
|
+
(e, t) => {
|
|
688
|
+
const { __scopeDialog: n, ...o } = e, r = b(ye, n);
|
|
689
|
+
return /* @__PURE__ */ d.jsx(
|
|
690
|
+
S.button,
|
|
691
|
+
{
|
|
692
|
+
type: "button",
|
|
693
|
+
...o,
|
|
694
|
+
ref: t,
|
|
695
|
+
onClick: O(e.onClick, () => r.onOpenChange(!1))
|
|
696
|
+
}
|
|
697
|
+
);
|
|
698
|
+
}
|
|
699
|
+
);
|
|
700
|
+
Ce.displayName = ye;
|
|
701
|
+
function V(e) {
|
|
702
|
+
return e ? "open" : "closed";
|
|
703
|
+
}
|
|
704
|
+
var be = "DialogTitleWarning", [Nt, De] = _e(be, {
|
|
705
|
+
contentName: N,
|
|
706
|
+
titleName: U,
|
|
707
|
+
docsSlug: "dialog"
|
|
708
|
+
}), ht = ({ titleId: e }) => {
|
|
709
|
+
const t = De(be), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
710
|
+
|
|
711
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
712
|
+
|
|
713
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
714
|
+
return i.useEffect(() => {
|
|
715
|
+
e && (document.getElementById(e) || console.error(n));
|
|
716
|
+
}, [n, e]), null;
|
|
717
|
+
}, yt = "DialogDescriptionWarning", Ct = ({ contentRef: e, descriptionId: t }) => {
|
|
718
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${De(yt).contentName}}.`;
|
|
719
|
+
return i.useEffect(() => {
|
|
720
|
+
var s;
|
|
721
|
+
const r = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
|
|
722
|
+
t && r && (document.getElementById(t) || console.warn(o));
|
|
723
|
+
}, [o, e, t]), null;
|
|
724
|
+
}, _t = ce, Tt = le, wt = fe, It = pe, Ft = ve, At = ge, Lt = he, jt = Ce;
|
|
725
|
+
export {
|
|
726
|
+
jt as C,
|
|
727
|
+
Lt as D,
|
|
728
|
+
It as O,
|
|
729
|
+
wt as P,
|
|
730
|
+
_t as R,
|
|
731
|
+
At as T,
|
|
732
|
+
Ft as a,
|
|
733
|
+
Tt as b
|
|
734
|
+
};
|