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