@pfct/purple 1.11.1 → 1.13.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/dotLotties/sample.lottie +0 -0
- package/dist/assets/images/fallback.png +0 -0
- package/dist/assets/images/fallback@2x.png +0 -0
- package/dist/assets/images/fallback@3x.png +0 -0
- package/dist/assets/index.css +2 -2
- package/dist/chunks/Accordion.CxDfMzK1.js +1 -0
- package/dist/chunks/{Accordion.BiAAJwmC.js → Accordion.D8caFIuT.js} +3 -2
- package/dist/chunks/{Divider.k5ROyG2W.js → Divider.CinbGPsa.js} +1 -1
- package/dist/chunks/{Divider.CfGqsPOG.js → Divider.KzhgrMYv.js} +1 -1
- package/dist/chunks/DotLottie.BEAWvPhB.js +71358 -0
- package/dist/chunks/DotLottie.DHSt1_0W.js +5 -0
- package/dist/chunks/{Switch.clBBQjY3.js → Switch.2ZixJdlG.js} +1 -1
- package/dist/chunks/{Switch.G7d5HjrW.js → Switch.Cf71RNLF.js} +2 -2
- package/dist/chunks/{bottomSheet.CbP1N3-g.js → bottomSheet.B5OrcCXx.js} +1 -1
- package/dist/chunks/{bottomSheet.BHvPqq91.js → bottomSheet.CnYVp9RP.js} +1 -1
- package/dist/chunks/{checkbox.DzMsJDRY.js → checkbox.CYGNBSUO.js} +1 -1
- package/dist/chunks/{checkbox.DjHLBzFe.js → checkbox.Dzvj-4RV.js} +2 -2
- package/dist/chunks/{dist.BbBE9J18.js → dist.6jgaVidM.js} +8 -7
- package/dist/chunks/dist.BixLWWwb.js +71 -0
- package/dist/chunks/dist.Bj_fI5rQ.js +1 -0
- package/dist/chunks/dist.BoEBrFAh.js +1 -0
- package/dist/chunks/dist.C4D-6Tcr.js +1 -0
- package/dist/chunks/{dist.D_s4kUUr.js → dist.CDZCWPu4.js} +1 -1
- package/dist/chunks/{dist.COetszRA.js → dist.CJY8LqRA.js} +1 -1
- package/dist/chunks/dist.CT8nUj9V.js +1 -0
- package/dist/chunks/dist.CYRtTgUR.js +96 -0
- package/dist/chunks/{dist.Cz5xL5vI.js → dist.CpTw9rlm.js} +1 -1
- package/dist/chunks/dist.Crl6KTg_.js +21 -0
- package/dist/chunks/dist.CwWM0zXK.js +25 -0
- package/dist/chunks/dist.DPo6XlLq.js +145 -0
- package/dist/chunks/dist.DTByVKhF.js +193 -0
- package/dist/chunks/dist.Ds9VPbBd.js +194 -0
- package/dist/chunks/dist.DvmdOncE.js +1 -0
- package/dist/chunks/dist.ERrpPEZ4.js +1 -0
- package/dist/chunks/dist.OINbhiqU.js +1 -0
- package/dist/chunks/dist.Xtc44Blp.js +1 -0
- package/dist/chunks/dist.mhQdJ8f2.js +170 -0
- package/dist/chunks/drawer.BewJ2D_w.js +1545 -0
- package/dist/chunks/drawer.Cty9wtvs.js +7 -0
- package/dist/chunks/es2015.ByVyszJo.js +562 -0
- package/dist/chunks/es2015.DoCbPEnP.js +41 -0
- package/dist/chunks/tooltip.Dv33hiJ0.js +1 -0
- package/dist/chunks/{tooltip.Bh_x0SaP.js → tooltip.w3pAhl4A.js} +5 -4
- package/dist/components/Accordion/index.cjs.js +1 -1
- package/dist/components/Accordion/index.esm.js +1 -1
- package/dist/components/Control/Switch/index.cjs.js +1 -1
- package/dist/components/Control/Switch/index.esm.js +1 -1
- package/dist/components/Control/index.cjs.js +1 -1
- package/dist/components/Control/index.esm.js +2 -2
- package/dist/components/DatePicker/RangeDatePickerModal/index.cjs.js +1 -1
- package/dist/components/DatePicker/RangeDatePickerModal/index.esm.js +1 -1
- package/dist/components/DatePicker/SingleDatePickerModal/index.cjs.js +1 -1
- package/dist/components/DatePicker/SingleDatePickerModal/index.esm.js +1 -1
- package/dist/components/Divider/index.cjs.js +1 -1
- package/dist/components/Divider/index.esm.js +1 -1
- package/dist/components/LegacyModal/index.cjs.js +1 -1
- package/dist/components/LegacyModal/index.esm.js +4 -4
- package/dist/components/MiniButton/IconMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/IconMiniButton/index.esm.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.cjs.js +1 -1
- package/dist/components/MiniButton/UnderLineMiniButton/index.esm.js +1 -1
- package/dist/components/Modal/index.cjs.js +1 -1
- package/dist/components/Modal/index.esm.js +10 -10
- package/dist/components/Pagination/index.cjs.js +1 -1
- package/dist/components/Pagination/index.esm.js +1 -1
- package/dist/components/SelectBox/index.cjs.js +1 -1
- package/dist/components/SelectBox/index.d.ts +6 -0
- package/dist/components/SelectBox/index.d.ts.map +1 -1
- package/dist/components/SelectBox/index.esm.js +42 -70
- package/dist/components/Tag/index.cjs.js +1 -1
- package/dist/components/Tag/index.esm.js +1 -1
- package/dist/components/Terms/index.cjs.js +1 -1
- package/dist/components/Terms/index.esm.js +3 -3
- package/dist/components/index.cjs.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.esm.js +16 -15
- package/dist/components/ui/bottomSheet.cjs.js +1 -1
- package/dist/components/ui/bottomSheet.esm.js +1 -1
- package/dist/components/ui/button.cjs.js +1 -1
- package/dist/components/ui/button.esm.js +1 -1
- package/dist/components/ui/checkbox.cjs.js +1 -1
- package/dist/components/ui/checkbox.esm.js +1 -1
- package/dist/components/ui/dialog.cjs.js +1 -1
- package/dist/components/ui/dialog.esm.js +10 -10
- package/dist/components/ui/drawer.cjs.js +1 -1
- package/dist/components/ui/drawer.esm.js +1 -1
- package/dist/components/ui/impact-tooltip.cjs.js +1 -1
- package/dist/components/ui/impact-tooltip.esm.js +83 -2
- package/dist/components/ui/select.cjs.js +1 -0
- package/dist/components/ui/select.d.ts +52 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.esm.js +182 -0
- package/dist/components/ui/tooltip.cjs.js +1 -1
- package/dist/components/ui/tooltip.esm.js +1 -1
- package/dist/components/ui/typography.cjs.js +1 -1
- package/dist/components/ui/typography.esm.js +1 -1
- package/dist/icons/src/aliases/aliases.cjs.js +1 -1
- package/dist/icons/src/aliases/aliases.d.ts +1 -1
- package/dist/icons/src/aliases/aliases.d.ts.map +1 -1
- package/dist/icons/src/aliases/aliases.esm.js +3 -3
- package/dist/icons/src/aliases/index.cjs.js +1 -1
- package/dist/icons/src/aliases/index.esm.js +3 -3
- package/dist/icons/src/aliases/prefixed.cjs.js +1 -1
- package/dist/icons/src/aliases/prefixed.d.ts +4 -4
- package/dist/icons/src/aliases/prefixed.d.ts.map +1 -1
- package/dist/icons/src/aliases/prefixed.esm.js +3 -3
- package/dist/icons/src/aliases/suffixed.cjs.js +1 -1
- package/dist/icons/src/aliases/suffixed.d.ts +6 -6
- package/dist/icons/src/aliases/suffixed.d.ts.map +1 -1
- package/dist/icons/src/aliases/suffixed.esm.js +3 -3
- package/dist/icons/src/icons/index.cjs.js +1 -1
- package/dist/icons/src/icons/index.esm.js +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +60 -58
- package/dist/library/DotLottie/index.cjs.js +1 -0
- package/dist/library/DotLottie/index.d.ts +21 -0
- package/dist/library/DotLottie/index.d.ts.map +1 -0
- package/dist/library/DotLottie/index.esm.js +2 -0
- package/dist/library/List/BottomSheetItemList/index.cjs.js +1 -1
- package/dist/library/List/BottomSheetItemList/index.esm.js +1 -1
- package/dist/library/Lottie/index.cjs.js +1 -1
- package/dist/library/Lottie/index.esm.js +67 -2
- package/dist/library/index.cjs.js +1 -1
- package/dist/library/index.d.ts +1 -0
- package/dist/library/index.d.ts.map +1 -1
- package/dist/library/index.esm.js +6 -5
- package/package.json +6 -5
- package/dist/chunks/Accordion.ClCq_Ey8.js +0 -1
- package/dist/chunks/Lottie.DxqtsFQi.js +0 -1
- package/dist/chunks/Lottie.RPp4wef7.js +0 -161
- package/dist/chunks/dist.CbqoUpiO.js +0 -5
- package/dist/chunks/dist.CrnGARhp.js +0 -1
- package/dist/chunks/dist.DXWLF1yO.js +0 -137
- package/dist/chunks/dist.DxuGUd9a.js +0 -93
- package/dist/chunks/dist.eT0KQJF1.js +0 -1
- package/dist/chunks/dist.o_suB-Ao.js +0 -217
- package/dist/chunks/drawer.CsTGeQfm.js +0 -987
- package/dist/chunks/drawer.Dl1NBBot.js +0 -3
- package/dist/chunks/es2015.DT_gWqJq.js +0 -705
- package/dist/chunks/es2015.YOXqRYz1.js +0 -41
- package/dist/chunks/impact-tooltip.CqzKZc1i.js +0 -268
- package/dist/chunks/impact-tooltip.MXdAL7_2.js +0 -1
- package/dist/chunks/tooltip.DXsV-PA7.js +0 -1
|
@@ -1,987 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./utils.D6DjRYW1.js";
|
|
2
|
-
import { a as t, c as n, i as r, n as i, o as a, r as o, s, t as c } from "./dist.o_suB-Ao.js";
|
|
3
|
-
import * as l from "react";
|
|
4
|
-
import u, { useEffect as d, useLayoutEffect as f, useMemo as p } from "react";
|
|
5
|
-
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
6
|
-
//#region node_modules/vaul/dist/index.mjs
|
|
7
|
-
function g(e) {
|
|
8
|
-
if (!e || typeof document > "u") return;
|
|
9
|
-
let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
10
|
-
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
11
|
-
}
|
|
12
|
-
var _ = u.createContext({
|
|
13
|
-
drawerRef: { current: null },
|
|
14
|
-
overlayRef: { current: null },
|
|
15
|
-
onPress: () => {},
|
|
16
|
-
onRelease: () => {},
|
|
17
|
-
onDrag: () => {},
|
|
18
|
-
onNestedDrag: () => {},
|
|
19
|
-
onNestedOpenChange: () => {},
|
|
20
|
-
onNestedRelease: () => {},
|
|
21
|
-
openProp: void 0,
|
|
22
|
-
dismissible: !1,
|
|
23
|
-
isOpen: !1,
|
|
24
|
-
isDragging: !1,
|
|
25
|
-
keyboardIsOpen: { current: !1 },
|
|
26
|
-
snapPointsOffset: null,
|
|
27
|
-
snapPoints: null,
|
|
28
|
-
handleOnly: !1,
|
|
29
|
-
modal: !1,
|
|
30
|
-
shouldFade: !1,
|
|
31
|
-
activeSnapPoint: null,
|
|
32
|
-
onOpenChange: () => {},
|
|
33
|
-
setActiveSnapPoint: () => {},
|
|
34
|
-
closeDrawer: () => {},
|
|
35
|
-
direction: "bottom",
|
|
36
|
-
shouldAnimate: { current: !0 },
|
|
37
|
-
shouldScaleBackground: !1,
|
|
38
|
-
setBackgroundColorOnScale: !0,
|
|
39
|
-
noBodyStyles: !1,
|
|
40
|
-
container: null,
|
|
41
|
-
autoFocus: !1
|
|
42
|
-
}), v = () => {
|
|
43
|
-
let e = u.useContext(_);
|
|
44
|
-
if (!e) throw Error("useDrawerContext must be used within a Drawer.Root");
|
|
45
|
-
return e;
|
|
46
|
-
};
|
|
47
|
-
g("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}");
|
|
48
|
-
function y() {
|
|
49
|
-
let e = navigator.userAgent;
|
|
50
|
-
return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || /FxiOS/.test(e));
|
|
51
|
-
}
|
|
52
|
-
function b() {
|
|
53
|
-
return w(/^Mac/);
|
|
54
|
-
}
|
|
55
|
-
function x() {
|
|
56
|
-
return w(/^iPhone/);
|
|
57
|
-
}
|
|
58
|
-
function S() {
|
|
59
|
-
return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
60
|
-
}
|
|
61
|
-
function C() {
|
|
62
|
-
return w(/^iPad/) || b() && navigator.maxTouchPoints > 1;
|
|
63
|
-
}
|
|
64
|
-
function ee() {
|
|
65
|
-
return x() || C();
|
|
66
|
-
}
|
|
67
|
-
function w(e) {
|
|
68
|
-
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
69
|
-
}
|
|
70
|
-
var T = 24, E = typeof window < "u" ? f : d;
|
|
71
|
-
function D(...e) {
|
|
72
|
-
return (...t) => {
|
|
73
|
-
for (let n of e) typeof n == "function" && n(...t);
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
var O = typeof document < "u" && window.visualViewport;
|
|
77
|
-
function k(e) {
|
|
78
|
-
let t = window.getComputedStyle(e);
|
|
79
|
-
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
80
|
-
}
|
|
81
|
-
function A(e) {
|
|
82
|
-
for (k(e) && (e = e.parentElement); e && !k(e);) e = e.parentElement;
|
|
83
|
-
return e || document.scrollingElement || document.documentElement;
|
|
84
|
-
}
|
|
85
|
-
var te = new Set([
|
|
86
|
-
"checkbox",
|
|
87
|
-
"radio",
|
|
88
|
-
"range",
|
|
89
|
-
"color",
|
|
90
|
-
"file",
|
|
91
|
-
"image",
|
|
92
|
-
"button",
|
|
93
|
-
"submit",
|
|
94
|
-
"reset"
|
|
95
|
-
]), j = 0, M;
|
|
96
|
-
function ne(e = {}) {
|
|
97
|
-
let { isDisabled: t } = e;
|
|
98
|
-
E(() => {
|
|
99
|
-
if (!t) return j++, j === 1 && ee() && (M = re()), () => {
|
|
100
|
-
j--, j === 0 && M?.();
|
|
101
|
-
};
|
|
102
|
-
}, [t]);
|
|
103
|
-
}
|
|
104
|
-
function re() {
|
|
105
|
-
let e, t = 0, n = (n) => {
|
|
106
|
-
e = A(n.target), !(e === document.documentElement && e === document.body) && (t = n.changedTouches[0].pageY);
|
|
107
|
-
}, r = (n) => {
|
|
108
|
-
if (!e || e === document.documentElement || e === document.body) {
|
|
109
|
-
n.preventDefault();
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
let r = n.changedTouches[0].pageY, i = e.scrollTop, a = e.scrollHeight - e.clientHeight;
|
|
113
|
-
a !== 0 && ((i <= 0 && r > t || i >= a && r < t) && n.preventDefault(), t = r);
|
|
114
|
-
}, i = (e) => {
|
|
115
|
-
let t = e.target;
|
|
116
|
-
ae(t) && t !== document.activeElement && (e.preventDefault(), t.style.transform = "translateY(-2000px)", t.focus(), requestAnimationFrame(() => {
|
|
117
|
-
t.style.transform = "";
|
|
118
|
-
}));
|
|
119
|
-
}, a = (e) => {
|
|
120
|
-
let t = e.target;
|
|
121
|
-
ae(t) && (t.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
122
|
-
t.style.transform = "", O && (O.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
123
|
-
P(t);
|
|
124
|
-
}) : O.addEventListener("resize", () => P(t), { once: !0 }));
|
|
125
|
-
}));
|
|
126
|
-
}, o = () => {
|
|
127
|
-
window.scrollTo(0, 0);
|
|
128
|
-
}, s = window.pageXOffset, c = window.pageYOffset, l = D(ie(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
129
|
-
window.scrollTo(0, 0);
|
|
130
|
-
let u = D(N(document, "touchstart", n, {
|
|
131
|
-
passive: !1,
|
|
132
|
-
capture: !0
|
|
133
|
-
}), N(document, "touchmove", r, {
|
|
134
|
-
passive: !1,
|
|
135
|
-
capture: !0
|
|
136
|
-
}), N(document, "touchend", i, {
|
|
137
|
-
passive: !1,
|
|
138
|
-
capture: !0
|
|
139
|
-
}), N(document, "focus", a, !0), N(window, "scroll", o));
|
|
140
|
-
return () => {
|
|
141
|
-
l(), u(), window.scrollTo(s, c);
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
function ie(e, t, n) {
|
|
145
|
-
let r = e.style[t];
|
|
146
|
-
return e.style[t] = n, () => {
|
|
147
|
-
e.style[t] = r;
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
function N(e, t, n, r) {
|
|
151
|
-
return e.addEventListener(t, n, r), () => {
|
|
152
|
-
e.removeEventListener(t, n, r);
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
function P(e) {
|
|
156
|
-
let t = document.scrollingElement || document.documentElement;
|
|
157
|
-
for (; e && e !== t;) {
|
|
158
|
-
let t = A(e);
|
|
159
|
-
if (t !== document.documentElement && t !== document.body && t !== e) {
|
|
160
|
-
let n = t.getBoundingClientRect().top, r = e.getBoundingClientRect().top;
|
|
161
|
-
e.getBoundingClientRect().bottom > t.getBoundingClientRect().bottom + T && (t.scrollTop += r - n);
|
|
162
|
-
}
|
|
163
|
-
e = t.parentElement;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
function ae(e) {
|
|
167
|
-
return e instanceof HTMLInputElement && !te.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
168
|
-
}
|
|
169
|
-
function oe(e, t) {
|
|
170
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
171
|
-
}
|
|
172
|
-
function se(...e) {
|
|
173
|
-
return (t) => e.forEach((e) => oe(e, t));
|
|
174
|
-
}
|
|
175
|
-
function ce(...e) {
|
|
176
|
-
return l.useCallback(se(...e), e);
|
|
177
|
-
}
|
|
178
|
-
var F = /* @__PURE__ */ new WeakMap();
|
|
179
|
-
function I(e, t, n = !1) {
|
|
180
|
-
if (!e || !(e instanceof HTMLElement)) return;
|
|
181
|
-
let r = {};
|
|
182
|
-
Object.entries(t).forEach(([t, n]) => {
|
|
183
|
-
if (t.startsWith("--")) {
|
|
184
|
-
e.style.setProperty(t, n);
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
r[t] = e.style[t], e.style[t] = n;
|
|
188
|
-
}), !n && F.set(e, r);
|
|
189
|
-
}
|
|
190
|
-
function le(e, t) {
|
|
191
|
-
if (!e || !(e instanceof HTMLElement)) return;
|
|
192
|
-
let n = F.get(e);
|
|
193
|
-
n && (e.style[t] = n[t]);
|
|
194
|
-
}
|
|
195
|
-
var L = (e) => {
|
|
196
|
-
switch (e) {
|
|
197
|
-
case "top":
|
|
198
|
-
case "bottom": return !0;
|
|
199
|
-
case "left":
|
|
200
|
-
case "right": return !1;
|
|
201
|
-
default: return e;
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
function R(e, t) {
|
|
205
|
-
if (!e) return null;
|
|
206
|
-
let n = window.getComputedStyle(e), r = n.transform || n.webkitTransform || n.mozTransform, i = r.match(/^matrix3d\((.+)\)$/);
|
|
207
|
-
return i ? parseFloat(i[1].split(", ")[L(t) ? 13 : 12]) : (i = r.match(/^matrix\((.+)\)$/), i ? parseFloat(i[1].split(", ")[L(t) ? 5 : 4]) : null);
|
|
208
|
-
}
|
|
209
|
-
function ue(e) {
|
|
210
|
-
return 8 * (Math.log(e + 1) - 2);
|
|
211
|
-
}
|
|
212
|
-
function z(e, t) {
|
|
213
|
-
if (!e) return () => {};
|
|
214
|
-
let n = e.style.cssText;
|
|
215
|
-
return Object.assign(e.style, t), () => {
|
|
216
|
-
e.style.cssText = n;
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
var B = {
|
|
220
|
-
DURATION: .5,
|
|
221
|
-
EASE: [
|
|
222
|
-
.32,
|
|
223
|
-
.72,
|
|
224
|
-
0,
|
|
225
|
-
1
|
|
226
|
-
]
|
|
227
|
-
}, de = .4, fe = .25, pe = 100, me = 8, V = 16, he = 26, ge = "vaul-dragging";
|
|
228
|
-
function H(e) {
|
|
229
|
-
let t = u.useRef(e);
|
|
230
|
-
return u.useEffect(() => {
|
|
231
|
-
t.current = e;
|
|
232
|
-
}), u.useMemo(() => (...e) => t.current == null ? void 0 : t.current.call(t, ...e), []);
|
|
233
|
-
}
|
|
234
|
-
function _e({ defaultProp: e, onChange: t }) {
|
|
235
|
-
let n = u.useState(e), [r] = n, i = u.useRef(r), a = H(t);
|
|
236
|
-
return u.useEffect(() => {
|
|
237
|
-
i.current !== r && (a(r), i.current = r);
|
|
238
|
-
}, [
|
|
239
|
-
r,
|
|
240
|
-
i,
|
|
241
|
-
a
|
|
242
|
-
]), n;
|
|
243
|
-
}
|
|
244
|
-
function ve({ prop: e, defaultProp: t, onChange: n = () => {} }) {
|
|
245
|
-
let [r, i] = _e({
|
|
246
|
-
defaultProp: t,
|
|
247
|
-
onChange: n
|
|
248
|
-
}), a = e !== void 0, o = a ? e : r, s = H(n);
|
|
249
|
-
return [o, u.useCallback((t) => {
|
|
250
|
-
if (a) {
|
|
251
|
-
let n = typeof t == "function" ? t(e) : t;
|
|
252
|
-
n !== e && s(n);
|
|
253
|
-
} else i(t);
|
|
254
|
-
}, [
|
|
255
|
-
a,
|
|
256
|
-
e,
|
|
257
|
-
i,
|
|
258
|
-
s
|
|
259
|
-
])];
|
|
260
|
-
}
|
|
261
|
-
function ye({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: i, fadeFromIndex: a, onSnapPointChange: o, direction: s = "bottom", container: c, snapToSequentialPoint: l }) {
|
|
262
|
-
let [d, f] = ve({
|
|
263
|
-
prop: e,
|
|
264
|
-
defaultProp: n?.[0],
|
|
265
|
-
onChange: t
|
|
266
|
-
}), [p, m] = u.useState(typeof window < "u" ? {
|
|
267
|
-
innerWidth: window.innerWidth,
|
|
268
|
-
innerHeight: window.innerHeight
|
|
269
|
-
} : void 0);
|
|
270
|
-
u.useEffect(() => {
|
|
271
|
-
function e() {
|
|
272
|
-
m({
|
|
273
|
-
innerWidth: window.innerWidth,
|
|
274
|
-
innerHeight: window.innerHeight
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
278
|
-
}, []);
|
|
279
|
-
let h = u.useMemo(() => d === n?.[n.length - 1] || null, [n, d]), g = u.useMemo(() => n?.findIndex((e) => e === d) ?? null, [n, d]), _ = n && n.length > 0 && (a || a === 0) && !Number.isNaN(a) && n[a] === d || !n, v = u.useMemo(() => {
|
|
280
|
-
let e = c ? {
|
|
281
|
-
width: c.getBoundingClientRect().width,
|
|
282
|
-
height: c.getBoundingClientRect().height
|
|
283
|
-
} : typeof window < "u" ? {
|
|
284
|
-
width: window.innerWidth,
|
|
285
|
-
height: window.innerHeight
|
|
286
|
-
} : {
|
|
287
|
-
width: 0,
|
|
288
|
-
height: 0
|
|
289
|
-
};
|
|
290
|
-
return n?.map((t) => {
|
|
291
|
-
let n = typeof t == "string", r = 0;
|
|
292
|
-
if (n && (r = parseInt(t, 10)), L(s)) {
|
|
293
|
-
let i = n ? r : p ? t * e.height : 0;
|
|
294
|
-
return p ? s === "bottom" ? e.height - i : -e.height + i : i;
|
|
295
|
-
}
|
|
296
|
-
let i = n ? r : p ? t * e.width : 0;
|
|
297
|
-
return p ? s === "right" ? e.width - i : -e.width + i : i;
|
|
298
|
-
}) ?? [];
|
|
299
|
-
}, [
|
|
300
|
-
n,
|
|
301
|
-
p,
|
|
302
|
-
c
|
|
303
|
-
]), y = u.useMemo(() => g === null ? null : v?.[g], [v, g]), b = u.useCallback((e) => {
|
|
304
|
-
let t = v?.findIndex((t) => t === e) ?? null;
|
|
305
|
-
o(t), I(r.current, {
|
|
306
|
-
transition: `transform ${B.DURATION}s cubic-bezier(${B.EASE.join(",")})`,
|
|
307
|
-
transform: L(s) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)`
|
|
308
|
-
}), v && t !== v.length - 1 && a !== void 0 && t !== a && t < a ? I(i.current, {
|
|
309
|
-
transition: `opacity ${B.DURATION}s cubic-bezier(${B.EASE.join(",")})`,
|
|
310
|
-
opacity: "0"
|
|
311
|
-
}) : I(i.current, {
|
|
312
|
-
transition: `opacity ${B.DURATION}s cubic-bezier(${B.EASE.join(",")})`,
|
|
313
|
-
opacity: "1"
|
|
314
|
-
}), f(n?.[Math.max(t, 0)]);
|
|
315
|
-
}, [
|
|
316
|
-
r.current,
|
|
317
|
-
n,
|
|
318
|
-
v,
|
|
319
|
-
a,
|
|
320
|
-
i,
|
|
321
|
-
f
|
|
322
|
-
]);
|
|
323
|
-
u.useEffect(() => {
|
|
324
|
-
if (d || e) {
|
|
325
|
-
let t = n?.findIndex((t) => t === e || t === d) ?? -1;
|
|
326
|
-
v && t !== -1 && typeof v[t] == "number" && b(v[t]);
|
|
327
|
-
}
|
|
328
|
-
}, [
|
|
329
|
-
d,
|
|
330
|
-
e,
|
|
331
|
-
n,
|
|
332
|
-
v,
|
|
333
|
-
b
|
|
334
|
-
]);
|
|
335
|
-
function x({ draggedDistance: e, closeDrawer: t, velocity: r, dismissible: o }) {
|
|
336
|
-
if (a === void 0) return;
|
|
337
|
-
let c = s === "bottom" || s === "right" ? (y ?? 0) - e : (y ?? 0) + e, u = g === a - 1, d = g === 0, f = e > 0;
|
|
338
|
-
if (u && I(i.current, { transition: `opacity ${B.DURATION}s cubic-bezier(${B.EASE.join(",")})` }), !l && r > 2 && !f) {
|
|
339
|
-
o ? t() : b(v[0]);
|
|
340
|
-
return;
|
|
341
|
-
}
|
|
342
|
-
if (!l && r > 2 && f && v && n) {
|
|
343
|
-
b(v[n.length - 1]);
|
|
344
|
-
return;
|
|
345
|
-
}
|
|
346
|
-
let p = v?.reduce((e, t) => typeof e != "number" || typeof t != "number" ? e : Math.abs(t - c) < Math.abs(e - c) ? t : e), m = L(s) ? window.innerHeight : window.innerWidth;
|
|
347
|
-
if (r > de && Math.abs(e) < m * .4) {
|
|
348
|
-
let e = f ? 1 : -1;
|
|
349
|
-
if (e > 0 && h && n) {
|
|
350
|
-
b(v[n.length - 1]);
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
if (d && e < 0 && o && t(), g === null) return;
|
|
354
|
-
b(v[g + e]);
|
|
355
|
-
return;
|
|
356
|
-
}
|
|
357
|
-
b(p);
|
|
358
|
-
}
|
|
359
|
-
function S({ draggedDistance: e }) {
|
|
360
|
-
if (y === null) return;
|
|
361
|
-
let t = s === "bottom" || s === "right" ? y - e : y + e;
|
|
362
|
-
(s === "bottom" || s === "right") && t < v[v.length - 1] || (s === "top" || s === "left") && t > v[v.length - 1] || I(r.current, { transform: L(s) ? `translate3d(0, ${t}px, 0)` : `translate3d(${t}px, 0, 0)` });
|
|
363
|
-
}
|
|
364
|
-
function C(e, t) {
|
|
365
|
-
if (!n || typeof g != "number" || !v || a === void 0) return null;
|
|
366
|
-
let r = g === a - 1;
|
|
367
|
-
if (g >= a && t) return 0;
|
|
368
|
-
if (r && !t) return 1;
|
|
369
|
-
if (!_ && !r) return null;
|
|
370
|
-
let i = r ? g + 1 : g - 1, o = r ? v[i] - v[i - 1] : v[i + 1] - v[i], s = e / Math.abs(o);
|
|
371
|
-
return r ? 1 - s : s;
|
|
372
|
-
}
|
|
373
|
-
return {
|
|
374
|
-
isLastSnapPoint: h,
|
|
375
|
-
activeSnapPoint: d,
|
|
376
|
-
shouldFade: _,
|
|
377
|
-
getPercentageDragged: C,
|
|
378
|
-
setActiveSnapPoint: f,
|
|
379
|
-
activeSnapPointIndex: g,
|
|
380
|
-
onRelease: x,
|
|
381
|
-
onDrag: S,
|
|
382
|
-
snapPointsOffset: v
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
function U() {
|
|
386
|
-
let { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: i } = v(), a = u.useRef(null), o = p(() => document.body.style.backgroundColor, []);
|
|
387
|
-
function s() {
|
|
388
|
-
return (window.innerWidth - he) / window.innerWidth;
|
|
389
|
-
}
|
|
390
|
-
u.useEffect(() => {
|
|
391
|
-
if (t && n) {
|
|
392
|
-
a.current && clearTimeout(a.current);
|
|
393
|
-
let t = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
|
|
394
|
-
if (!t) return;
|
|
395
|
-
r && !i && z(document.body, { background: "black" }), z(t, {
|
|
396
|
-
transformOrigin: L(e) ? "top" : "left",
|
|
397
|
-
transitionProperty: "transform, border-radius",
|
|
398
|
-
transitionDuration: `${B.DURATION}s`,
|
|
399
|
-
transitionTimingFunction: `cubic-bezier(${B.EASE.join(",")})`
|
|
400
|
-
});
|
|
401
|
-
let n = z(t, {
|
|
402
|
-
borderRadius: `${me}px`,
|
|
403
|
-
overflow: "hidden",
|
|
404
|
-
...L(e) ? { transform: `scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)` } : { transform: `scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)` }
|
|
405
|
-
});
|
|
406
|
-
return () => {
|
|
407
|
-
n(), a.current = window.setTimeout(() => {
|
|
408
|
-
o ? document.body.style.background = o : document.body.style.removeProperty("background");
|
|
409
|
-
}, B.DURATION * 1e3);
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
}, [
|
|
413
|
-
t,
|
|
414
|
-
n,
|
|
415
|
-
o
|
|
416
|
-
]);
|
|
417
|
-
}
|
|
418
|
-
var W = null;
|
|
419
|
-
function be({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: i, noBodyStyles: a }) {
|
|
420
|
-
let [o, s] = u.useState(() => typeof window < "u" ? window.location.href : ""), c = u.useRef(0), l = u.useCallback(() => {
|
|
421
|
-
if (S() && W === null && e && !a) {
|
|
422
|
-
W = {
|
|
423
|
-
position: document.body.style.position,
|
|
424
|
-
top: document.body.style.top,
|
|
425
|
-
left: document.body.style.left,
|
|
426
|
-
height: document.body.style.height,
|
|
427
|
-
right: "unset"
|
|
428
|
-
};
|
|
429
|
-
let { scrollX: e, innerHeight: t } = window;
|
|
430
|
-
document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
|
|
431
|
-
top: `${-c.current}px`,
|
|
432
|
-
left: `${-e}px`,
|
|
433
|
-
right: "0px",
|
|
434
|
-
height: "auto"
|
|
435
|
-
}), window.setTimeout(() => window.requestAnimationFrame(() => {
|
|
436
|
-
let e = t - window.innerHeight;
|
|
437
|
-
e && c.current >= t && (document.body.style.top = `${-(c.current + e)}px`);
|
|
438
|
-
}), 300);
|
|
439
|
-
}
|
|
440
|
-
}, [e]), d = u.useCallback(() => {
|
|
441
|
-
if (S() && W !== null && !a) {
|
|
442
|
-
let e = -parseInt(document.body.style.top, 10), t = -parseInt(document.body.style.left, 10);
|
|
443
|
-
Object.assign(document.body.style, W), window.requestAnimationFrame(() => {
|
|
444
|
-
if (i && o !== window.location.href) {
|
|
445
|
-
s(window.location.href);
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
window.scrollTo(t, e);
|
|
449
|
-
}), W = null;
|
|
450
|
-
}
|
|
451
|
-
}, [o]);
|
|
452
|
-
return u.useEffect(() => {
|
|
453
|
-
function e() {
|
|
454
|
-
c.current = window.scrollY;
|
|
455
|
-
}
|
|
456
|
-
return e(), window.addEventListener("scroll", e), () => {
|
|
457
|
-
window.removeEventListener("scroll", e);
|
|
458
|
-
};
|
|
459
|
-
}, []), u.useEffect(() => {
|
|
460
|
-
if (t) return () => {
|
|
461
|
-
typeof document > "u" || document.querySelector("[data-vaul-drawer]") || d();
|
|
462
|
-
};
|
|
463
|
-
}, [t, d]), u.useEffect(() => {
|
|
464
|
-
n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && l(), t || window.setTimeout(() => {
|
|
465
|
-
d();
|
|
466
|
-
}, 500)) : d());
|
|
467
|
-
}, [
|
|
468
|
-
e,
|
|
469
|
-
r,
|
|
470
|
-
o,
|
|
471
|
-
t,
|
|
472
|
-
n,
|
|
473
|
-
l,
|
|
474
|
-
d
|
|
475
|
-
]), { restorePositionSetting: d };
|
|
476
|
-
}
|
|
477
|
-
function G({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: i, snapPoints: o, shouldScaleBackground: s = !1, setBackgroundColorOnScale: c = !0, closeThreshold: l = fe, scrollLockTimeout: d = pe, dismissible: f = !0, handleOnly: p = !1, fadeFromIndex: m = o && o.length - 1, activeSnapPoint: h, setActiveSnapPoint: g, fixed: v, modal: b = !0, onClose: x, nested: S, noBodyStyles: C = !1, direction: w = "bottom", defaultOpen: T = !1, disablePreventScroll: E = !0, snapToSequentialPoint: D = !1, preventScrollRestoration: O = !1, repositionInputs: k = !0, onAnimationEnd: A, container: te, autoFocus: j = !1 }) {
|
|
478
|
-
let [M = !1, re] = ve({
|
|
479
|
-
defaultProp: T,
|
|
480
|
-
prop: e,
|
|
481
|
-
onChange: (e) => {
|
|
482
|
-
t?.(e), !e && !S && je(), setTimeout(() => {
|
|
483
|
-
A?.(e);
|
|
484
|
-
}, B.DURATION * 1e3), e && !b && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
485
|
-
document.body.style.pointerEvents = "auto";
|
|
486
|
-
}), e || (document.body.style.pointerEvents = "auto");
|
|
487
|
-
}
|
|
488
|
-
}), [ie, N] = u.useState(!1), [P, oe] = u.useState(!1), [se, ce] = u.useState(!1), F = u.useRef(null), z = u.useRef(null), H = u.useRef(null), _e = u.useRef(null), U = u.useRef(null), W = u.useRef(!1), G = u.useRef(null), K = u.useRef(0), q = u.useRef(!1), xe = u.useRef(!T), Se = u.useRef(0), J = u.useRef(null), Ce = u.useRef(J.current?.getBoundingClientRect().height || 0), we = u.useRef(J.current?.getBoundingClientRect().width || 0), Y = u.useRef(0), { activeSnapPoint: Te, activeSnapPointIndex: X, setActiveSnapPoint: Ee, onRelease: De, snapPointsOffset: Z, onDrag: Oe, shouldFade: ke, getPercentageDragged: Ae } = ye({
|
|
489
|
-
snapPoints: o,
|
|
490
|
-
activeSnapPointProp: h,
|
|
491
|
-
setActiveSnapPointProp: g,
|
|
492
|
-
drawerRef: J,
|
|
493
|
-
fadeFromIndex: m,
|
|
494
|
-
overlayRef: F,
|
|
495
|
-
onSnapPointChange: u.useCallback((e) => {
|
|
496
|
-
o && e === Z.length - 1 && (z.current = /* @__PURE__ */ new Date());
|
|
497
|
-
}, []),
|
|
498
|
-
direction: w,
|
|
499
|
-
container: te,
|
|
500
|
-
snapToSequentialPoint: D
|
|
501
|
-
});
|
|
502
|
-
ne({ isDisabled: !M || P || !b || se || !ie || !k || !E });
|
|
503
|
-
let { restorePositionSetting: je } = be({
|
|
504
|
-
isOpen: M,
|
|
505
|
-
modal: b,
|
|
506
|
-
nested: S ?? !1,
|
|
507
|
-
hasBeenOpened: ie,
|
|
508
|
-
preventScrollRestoration: O,
|
|
509
|
-
noBodyStyles: C
|
|
510
|
-
});
|
|
511
|
-
function Q() {
|
|
512
|
-
return (window.innerWidth - he) / window.innerWidth;
|
|
513
|
-
}
|
|
514
|
-
function Me(e) {
|
|
515
|
-
!f && !o || J.current && !J.current.contains(e.target) || (Ce.current = J.current?.getBoundingClientRect().height || 0, we.current = J.current?.getBoundingClientRect().width || 0, oe(!0), H.current = /* @__PURE__ */ new Date(), ee() && window.addEventListener("touchend", () => W.current = !1, { once: !0 }), e.target.setPointerCapture(e.pointerId), K.current = L(w) ? e.pageY : e.pageX);
|
|
516
|
-
}
|
|
517
|
-
function Ne(e, t) {
|
|
518
|
-
let n = e, r = window.getSelection()?.toString(), i = J.current ? R(J.current, w) : null, a = /* @__PURE__ */ new Date();
|
|
519
|
-
if (n.tagName === "SELECT" || n.hasAttribute("data-vaul-no-drag") || n.closest("[data-vaul-no-drag]")) return !1;
|
|
520
|
-
if (w === "right" || w === "left") return !0;
|
|
521
|
-
if (z.current && a.getTime() - z.current.getTime() < 500) return !1;
|
|
522
|
-
if (i !== null && (w === "bottom" ? i > 0 : i < 0)) return !0;
|
|
523
|
-
if (r && r.length > 0) return !1;
|
|
524
|
-
if (U.current && a.getTime() - U.current.getTime() < d && i === 0 || t) return U.current = a, !1;
|
|
525
|
-
for (; n;) {
|
|
526
|
-
if (n.scrollHeight > n.clientHeight) {
|
|
527
|
-
if (n.scrollTop !== 0) return U.current = /* @__PURE__ */ new Date(), !1;
|
|
528
|
-
if (n.getAttribute("role") === "dialog") return !0;
|
|
529
|
-
}
|
|
530
|
-
n = n.parentNode;
|
|
531
|
-
}
|
|
532
|
-
return !0;
|
|
533
|
-
}
|
|
534
|
-
function Pe(e) {
|
|
535
|
-
if (J.current && P) {
|
|
536
|
-
let t = w === "bottom" || w === "right" ? 1 : -1, n = (K.current - (L(w) ? e.pageY : e.pageX)) * t, i = n > 0, a = o && !f && !i;
|
|
537
|
-
if (a && X === 0) return;
|
|
538
|
-
let c = Math.abs(n), l = document.querySelector("[data-vaul-drawer-wrapper]"), u = c / (w === "bottom" || w === "top" ? Ce.current : we.current), d = Ae(c, i);
|
|
539
|
-
if (d !== null && (u = d), a && u >= 1 || !W.current && !Ne(e.target, i)) return;
|
|
540
|
-
if (J.current.classList.add(ge), W.current = !0, I(J.current, { transition: "none" }), I(F.current, { transition: "none" }), o && Oe({ draggedDistance: n }), i && !o) {
|
|
541
|
-
let e = ue(n), r = Math.min(e * -1, 0) * t;
|
|
542
|
-
I(J.current, { transform: L(w) ? `translate3d(0, ${r}px, 0)` : `translate3d(${r}px, 0, 0)` });
|
|
543
|
-
return;
|
|
544
|
-
}
|
|
545
|
-
let p = 1 - u;
|
|
546
|
-
if ((ke || m && X === m - 1) && (r?.(e, u), I(F.current, {
|
|
547
|
-
opacity: `${p}`,
|
|
548
|
-
transition: "none"
|
|
549
|
-
}, !0)), l && F.current && s) {
|
|
550
|
-
let e = Math.min(Q() + u * (1 - Q()), 1), t = 8 - u * 8, n = Math.max(0, 14 - u * 14);
|
|
551
|
-
I(l, {
|
|
552
|
-
borderRadius: `${t}px`,
|
|
553
|
-
transform: L(w) ? `scale(${e}) translate3d(0, ${n}px, 0)` : `scale(${e}) translate3d(${n}px, 0, 0)`,
|
|
554
|
-
transition: "none"
|
|
555
|
-
}, !0);
|
|
556
|
-
}
|
|
557
|
-
if (!o) {
|
|
558
|
-
let e = c * t;
|
|
559
|
-
I(J.current, { transform: L(w) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)` });
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
u.useEffect(() => {
|
|
564
|
-
window.requestAnimationFrame(() => {
|
|
565
|
-
xe.current = !0;
|
|
566
|
-
});
|
|
567
|
-
}, []), u.useEffect(() => {
|
|
568
|
-
var e;
|
|
569
|
-
function t() {
|
|
570
|
-
if (!J.current || !k) return;
|
|
571
|
-
let e = document.activeElement;
|
|
572
|
-
if (ae(e) || q.current) {
|
|
573
|
-
let e = window.visualViewport?.height || 0, t = window.innerHeight, n = t - e, r = J.current.getBoundingClientRect().height || 0, i = r > t * .8;
|
|
574
|
-
Y.current ||= r;
|
|
575
|
-
let a = J.current.getBoundingClientRect().top;
|
|
576
|
-
if (Math.abs(Se.current - n) > 60 && (q.current = !q.current), o && o.length > 0 && Z && X) {
|
|
577
|
-
let e = Z[X] || 0;
|
|
578
|
-
n += e;
|
|
579
|
-
}
|
|
580
|
-
if (Se.current = n, r > e || q.current) {
|
|
581
|
-
let t = J.current.getBoundingClientRect().height, r = t;
|
|
582
|
-
t > e && (r = e - (i ? a : he)), v ? J.current.style.height = `${t - Math.max(n, 0)}px` : J.current.style.height = `${Math.max(r, e - a)}px`;
|
|
583
|
-
} else y() || (J.current.style.height = `${Y.current}px`);
|
|
584
|
-
o && o.length > 0 && !q.current ? J.current.style.bottom = "0px" : J.current.style.bottom = `${Math.max(n, 0)}px`;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
return (e = window.visualViewport) == null || e.addEventListener("resize", t), () => window.visualViewport?.removeEventListener("resize", t);
|
|
588
|
-
}, [
|
|
589
|
-
X,
|
|
590
|
-
o,
|
|
591
|
-
Z
|
|
592
|
-
]);
|
|
593
|
-
function $(e) {
|
|
594
|
-
Ie(), x?.(), e || re(!1), setTimeout(() => {
|
|
595
|
-
o && Ee(o[0]);
|
|
596
|
-
}, B.DURATION * 1e3);
|
|
597
|
-
}
|
|
598
|
-
function Fe() {
|
|
599
|
-
if (!J.current) return;
|
|
600
|
-
let e = document.querySelector("[data-vaul-drawer-wrapper]"), t = R(J.current, w);
|
|
601
|
-
I(J.current, {
|
|
602
|
-
transform: "translate3d(0, 0, 0)",
|
|
603
|
-
transition: `transform ${B.DURATION}s cubic-bezier(${B.EASE.join(",")})`
|
|
604
|
-
}), I(F.current, {
|
|
605
|
-
transition: `opacity ${B.DURATION}s cubic-bezier(${B.EASE.join(",")})`,
|
|
606
|
-
opacity: "1"
|
|
607
|
-
}), s && t && t > 0 && M && I(e, {
|
|
608
|
-
borderRadius: `${me}px`,
|
|
609
|
-
overflow: "hidden",
|
|
610
|
-
...L(w) ? {
|
|
611
|
-
transform: `scale(${Q()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
612
|
-
transformOrigin: "top"
|
|
613
|
-
} : {
|
|
614
|
-
transform: `scale(${Q()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
615
|
-
transformOrigin: "left"
|
|
616
|
-
},
|
|
617
|
-
transitionProperty: "transform, border-radius",
|
|
618
|
-
transitionDuration: `${B.DURATION}s`,
|
|
619
|
-
transitionTimingFunction: `cubic-bezier(${B.EASE.join(",")})`
|
|
620
|
-
}, !0);
|
|
621
|
-
}
|
|
622
|
-
function Ie() {
|
|
623
|
-
!P || !J.current || (J.current.classList.remove(ge), W.current = !1, oe(!1), _e.current = /* @__PURE__ */ new Date());
|
|
624
|
-
}
|
|
625
|
-
function Le(e) {
|
|
626
|
-
if (!P || !J.current) return;
|
|
627
|
-
J.current.classList.remove(ge), W.current = !1, oe(!1), _e.current = /* @__PURE__ */ new Date();
|
|
628
|
-
let t = R(J.current, w);
|
|
629
|
-
if (!e || !Ne(e.target, !1) || !t || Number.isNaN(t) || H.current === null) return;
|
|
630
|
-
let n = _e.current.getTime() - H.current.getTime(), r = K.current - (L(w) ? e.pageY : e.pageX), a = Math.abs(r) / n;
|
|
631
|
-
if (a > .05 && (ce(!0), setTimeout(() => {
|
|
632
|
-
ce(!1);
|
|
633
|
-
}, 200)), o) {
|
|
634
|
-
De({
|
|
635
|
-
draggedDistance: r * (w === "bottom" || w === "right" ? 1 : -1),
|
|
636
|
-
closeDrawer: $,
|
|
637
|
-
velocity: a,
|
|
638
|
-
dismissible: f
|
|
639
|
-
}), i?.(e, !0);
|
|
640
|
-
return;
|
|
641
|
-
}
|
|
642
|
-
if (w === "bottom" || w === "right" ? r > 0 : r < 0) {
|
|
643
|
-
Fe(), i?.(e, !0);
|
|
644
|
-
return;
|
|
645
|
-
}
|
|
646
|
-
if (a > de) {
|
|
647
|
-
$(), i?.(e, !1);
|
|
648
|
-
return;
|
|
649
|
-
}
|
|
650
|
-
let s = Math.min(J.current.getBoundingClientRect().height ?? 0, window.innerHeight), c = Math.min(J.current.getBoundingClientRect().width ?? 0, window.innerWidth);
|
|
651
|
-
if (Math.abs(t) >= (w === "left" || w === "right" ? c : s) * l) {
|
|
652
|
-
$(), i?.(e, !1);
|
|
653
|
-
return;
|
|
654
|
-
}
|
|
655
|
-
i?.(e, !0), Fe();
|
|
656
|
-
}
|
|
657
|
-
u.useEffect(() => (M && (I(document.documentElement, { scrollBehavior: "auto" }), z.current = /* @__PURE__ */ new Date()), () => {
|
|
658
|
-
le(document.documentElement, "scrollBehavior");
|
|
659
|
-
}), [M]);
|
|
660
|
-
function Re(e) {
|
|
661
|
-
let t = e ? (window.innerWidth - V) / window.innerWidth : 1, n = e ? -16 : 0;
|
|
662
|
-
G.current && window.clearTimeout(G.current), I(J.current, {
|
|
663
|
-
transition: `transform ${B.DURATION}s cubic-bezier(${B.EASE.join(",")})`,
|
|
664
|
-
transform: L(w) ? `scale(${t}) translate3d(0, ${n}px, 0)` : `scale(${t}) translate3d(${n}px, 0, 0)`
|
|
665
|
-
}), !e && J.current && (G.current = setTimeout(() => {
|
|
666
|
-
let e = R(J.current, w);
|
|
667
|
-
I(J.current, {
|
|
668
|
-
transition: "none",
|
|
669
|
-
transform: L(w) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)`
|
|
670
|
-
});
|
|
671
|
-
}, 500));
|
|
672
|
-
}
|
|
673
|
-
function ze(e, t) {
|
|
674
|
-
if (t < 0) return;
|
|
675
|
-
let n = (window.innerWidth - V) / window.innerWidth, r = n + t * (1 - n), i = -16 + t * V;
|
|
676
|
-
I(J.current, {
|
|
677
|
-
transform: L(w) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`,
|
|
678
|
-
transition: "none"
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
function Be(e, t) {
|
|
682
|
-
let n = L(w) ? window.innerHeight : window.innerWidth, r = t ? (n - V) / n : 1, i = t ? -16 : 0;
|
|
683
|
-
t && I(J.current, {
|
|
684
|
-
transition: `transform ${B.DURATION}s cubic-bezier(${B.EASE.join(",")})`,
|
|
685
|
-
transform: L(w) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
|
-
return u.useEffect(() => {
|
|
689
|
-
b || window.requestAnimationFrame(() => {
|
|
690
|
-
document.body.style.pointerEvents = "auto";
|
|
691
|
-
});
|
|
692
|
-
}, [b]), /*#__PURE__*/ u.createElement(a, {
|
|
693
|
-
defaultOpen: T,
|
|
694
|
-
onOpenChange: (e) => {
|
|
695
|
-
!f && !e || (e ? N(!0) : $(!0), re(e));
|
|
696
|
-
},
|
|
697
|
-
open: M
|
|
698
|
-
}, /*#__PURE__*/ u.createElement(_.Provider, { value: {
|
|
699
|
-
activeSnapPoint: Te,
|
|
700
|
-
snapPoints: o,
|
|
701
|
-
setActiveSnapPoint: Ee,
|
|
702
|
-
drawerRef: J,
|
|
703
|
-
overlayRef: F,
|
|
704
|
-
onOpenChange: t,
|
|
705
|
-
onPress: Me,
|
|
706
|
-
onRelease: Le,
|
|
707
|
-
onDrag: Pe,
|
|
708
|
-
dismissible: f,
|
|
709
|
-
shouldAnimate: xe,
|
|
710
|
-
handleOnly: p,
|
|
711
|
-
isOpen: M,
|
|
712
|
-
isDragging: P,
|
|
713
|
-
shouldFade: ke,
|
|
714
|
-
closeDrawer: $,
|
|
715
|
-
onNestedDrag: ze,
|
|
716
|
-
onNestedOpenChange: Re,
|
|
717
|
-
onNestedRelease: Be,
|
|
718
|
-
keyboardIsOpen: q,
|
|
719
|
-
modal: b,
|
|
720
|
-
snapPointsOffset: Z,
|
|
721
|
-
activeSnapPointIndex: X,
|
|
722
|
-
direction: w,
|
|
723
|
-
shouldScaleBackground: s,
|
|
724
|
-
setBackgroundColorOnScale: c,
|
|
725
|
-
noBodyStyles: C,
|
|
726
|
-
container: te,
|
|
727
|
-
autoFocus: j
|
|
728
|
-
} }, n));
|
|
729
|
-
}
|
|
730
|
-
var K = /*#__PURE__*/ u.forwardRef(function({ ...e }, t) {
|
|
731
|
-
let { overlayRef: n, snapPoints: i, onRelease: a, shouldFade: o, isOpen: s, modal: c, shouldAnimate: l } = v(), d = ce(t, n), f = i && i.length > 0;
|
|
732
|
-
if (!c) return null;
|
|
733
|
-
let p = u.useCallback((e) => a(e), [a]);
|
|
734
|
-
return /*#__PURE__*/ u.createElement(r, {
|
|
735
|
-
onMouseUp: p,
|
|
736
|
-
ref: d,
|
|
737
|
-
"data-vaul-overlay": "",
|
|
738
|
-
"data-vaul-snap-points": s && f ? "true" : "false",
|
|
739
|
-
"data-vaul-snap-points-overlay": s && o ? "true" : "false",
|
|
740
|
-
"data-vaul-animate": l?.current ? "true" : "false",
|
|
741
|
-
...e
|
|
742
|
-
});
|
|
743
|
-
});
|
|
744
|
-
K.displayName = "Drawer.Overlay";
|
|
745
|
-
var q = /*#__PURE__*/ u.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, a) {
|
|
746
|
-
let { drawerRef: o, onPress: s, onRelease: c, onDrag: l, keyboardIsOpen: d, snapPointsOffset: f, activeSnapPointIndex: p, modal: m, isOpen: h, direction: g, snapPoints: _, container: y, handleOnly: b, shouldAnimate: x, autoFocus: S } = v(), [C, ee] = u.useState(!1), w = ce(a, o), T = u.useRef(null), E = u.useRef(null), D = u.useRef(!1), O = _ && _.length > 0;
|
|
747
|
-
U();
|
|
748
|
-
let k = (e, t, n = 0) => {
|
|
749
|
-
if (D.current) return !0;
|
|
750
|
-
let r = Math.abs(e.y), i = Math.abs(e.x), a = i > r, o = ["bottom", "right"].includes(t) ? 1 : -1;
|
|
751
|
-
if (t === "left" || t === "right") {
|
|
752
|
-
if (!(e.x * o < 0) && i >= 0 && i <= n) return a;
|
|
753
|
-
} else if (!(e.y * o < 0) && r >= 0 && r <= n) return !a;
|
|
754
|
-
return D.current = !0, !0;
|
|
755
|
-
};
|
|
756
|
-
u.useEffect(() => {
|
|
757
|
-
O && window.requestAnimationFrame(() => {
|
|
758
|
-
ee(!0);
|
|
759
|
-
});
|
|
760
|
-
}, []);
|
|
761
|
-
function A(e) {
|
|
762
|
-
T.current = null, D.current = !1, c(e);
|
|
763
|
-
}
|
|
764
|
-
return /*#__PURE__*/ u.createElement(i, {
|
|
765
|
-
"data-vaul-drawer-direction": g,
|
|
766
|
-
"data-vaul-drawer": "",
|
|
767
|
-
"data-vaul-delayed-snap-points": C ? "true" : "false",
|
|
768
|
-
"data-vaul-snap-points": h && O ? "true" : "false",
|
|
769
|
-
"data-vaul-custom-container": y ? "true" : "false",
|
|
770
|
-
"data-vaul-animate": x?.current ? "true" : "false",
|
|
771
|
-
...r,
|
|
772
|
-
ref: w,
|
|
773
|
-
style: f && f.length > 0 ? {
|
|
774
|
-
"--snap-point-height": `${f[p ?? 0]}px`,
|
|
775
|
-
...t
|
|
776
|
-
} : t,
|
|
777
|
-
onPointerDown: (e) => {
|
|
778
|
-
b || (r.onPointerDown == null || r.onPointerDown.call(r, e), T.current = {
|
|
779
|
-
x: e.pageX,
|
|
780
|
-
y: e.pageY
|
|
781
|
-
}, s(e));
|
|
782
|
-
},
|
|
783
|
-
onOpenAutoFocus: (e) => {
|
|
784
|
-
n?.(e), S || e.preventDefault();
|
|
785
|
-
},
|
|
786
|
-
onPointerDownOutside: (t) => {
|
|
787
|
-
if (e?.(t), !m || t.defaultPrevented) {
|
|
788
|
-
t.preventDefault();
|
|
789
|
-
return;
|
|
790
|
-
}
|
|
791
|
-
d.current &&= !1;
|
|
792
|
-
},
|
|
793
|
-
onFocusOutside: (e) => {
|
|
794
|
-
if (!m) {
|
|
795
|
-
e.preventDefault();
|
|
796
|
-
return;
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
onPointerMove: (e) => {
|
|
800
|
-
if (E.current = e, b || (r.onPointerMove == null || r.onPointerMove.call(r, e), !T.current)) return;
|
|
801
|
-
let t = e.pageY - T.current.y, n = e.pageX - T.current.x, i = e.pointerType === "touch" ? 10 : 2;
|
|
802
|
-
k({
|
|
803
|
-
x: n,
|
|
804
|
-
y: t
|
|
805
|
-
}, g, i) ? l(e) : (Math.abs(n) > i || Math.abs(t) > i) && (T.current = null);
|
|
806
|
-
},
|
|
807
|
-
onPointerUp: (e) => {
|
|
808
|
-
r.onPointerUp == null || r.onPointerUp.call(r, e), T.current = null, D.current = !1, c(e);
|
|
809
|
-
},
|
|
810
|
-
onPointerOut: (e) => {
|
|
811
|
-
r.onPointerOut == null || r.onPointerOut.call(r, e), A(E.current);
|
|
812
|
-
},
|
|
813
|
-
onContextMenu: (e) => {
|
|
814
|
-
r.onContextMenu == null || r.onContextMenu.call(r, e), E.current && A(E.current);
|
|
815
|
-
}
|
|
816
|
-
});
|
|
817
|
-
});
|
|
818
|
-
q.displayName = "Drawer.Content";
|
|
819
|
-
var xe = 250, Se = 120, J = /*#__PURE__*/ u.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
820
|
-
let { closeDrawer: i, isDragging: a, snapPoints: o, activeSnapPoint: s, setActiveSnapPoint: c, dismissible: l, handleOnly: d, isOpen: f, onPress: p, onDrag: m } = v(), h = u.useRef(null), g = u.useRef(!1);
|
|
821
|
-
function _() {
|
|
822
|
-
if (g.current) {
|
|
823
|
-
x();
|
|
824
|
-
return;
|
|
825
|
-
}
|
|
826
|
-
window.setTimeout(() => {
|
|
827
|
-
y();
|
|
828
|
-
}, Se);
|
|
829
|
-
}
|
|
830
|
-
function y() {
|
|
831
|
-
if (a || e || g.current) {
|
|
832
|
-
x();
|
|
833
|
-
return;
|
|
834
|
-
}
|
|
835
|
-
if (x(), !o || o.length === 0) {
|
|
836
|
-
l || i();
|
|
837
|
-
return;
|
|
838
|
-
}
|
|
839
|
-
if (s === o[o.length - 1] && l) {
|
|
840
|
-
i();
|
|
841
|
-
return;
|
|
842
|
-
}
|
|
843
|
-
let t = o.findIndex((e) => e === s);
|
|
844
|
-
if (t === -1) return;
|
|
845
|
-
let n = o[t + 1];
|
|
846
|
-
c(n);
|
|
847
|
-
}
|
|
848
|
-
function b() {
|
|
849
|
-
h.current = window.setTimeout(() => {
|
|
850
|
-
g.current = !0;
|
|
851
|
-
}, xe);
|
|
852
|
-
}
|
|
853
|
-
function x() {
|
|
854
|
-
h.current && window.clearTimeout(h.current), g.current = !1;
|
|
855
|
-
}
|
|
856
|
-
return /*#__PURE__*/ u.createElement("div", {
|
|
857
|
-
onClick: _,
|
|
858
|
-
onPointerCancel: x,
|
|
859
|
-
onPointerDown: (e) => {
|
|
860
|
-
d && p(e), b();
|
|
861
|
-
},
|
|
862
|
-
onPointerMove: (e) => {
|
|
863
|
-
d && m(e);
|
|
864
|
-
},
|
|
865
|
-
ref: r,
|
|
866
|
-
"data-vaul-drawer-visible": f ? "true" : "false",
|
|
867
|
-
"data-vaul-handle": "",
|
|
868
|
-
"aria-hidden": "true",
|
|
869
|
-
...n
|
|
870
|
-
}, /*#__PURE__*/ u.createElement("span", {
|
|
871
|
-
"data-vaul-handle-hitarea": "",
|
|
872
|
-
"aria-hidden": "true"
|
|
873
|
-
}, t));
|
|
874
|
-
});
|
|
875
|
-
J.displayName = "Drawer.Handle";
|
|
876
|
-
function Ce({ onDrag: e, onOpenChange: t, open: n, ...r }) {
|
|
877
|
-
let { onNestedDrag: i, onNestedOpenChange: a, onNestedRelease: o } = v();
|
|
878
|
-
if (!i) throw Error("Drawer.NestedRoot must be placed in another drawer");
|
|
879
|
-
return /*#__PURE__*/ u.createElement(G, {
|
|
880
|
-
nested: !0,
|
|
881
|
-
open: n,
|
|
882
|
-
onClose: () => {
|
|
883
|
-
a(!1);
|
|
884
|
-
},
|
|
885
|
-
onDrag: (t, n) => {
|
|
886
|
-
i(t, n), e?.(t, n);
|
|
887
|
-
},
|
|
888
|
-
onOpenChange: (e) => {
|
|
889
|
-
e && a(e), t?.(e);
|
|
890
|
-
},
|
|
891
|
-
onRelease: o,
|
|
892
|
-
...r
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
function we(e) {
|
|
896
|
-
let n = v(), { container: r = n.container, ...i } = e;
|
|
897
|
-
return /*#__PURE__*/ u.createElement(t, {
|
|
898
|
-
container: r,
|
|
899
|
-
...i
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
var Y = {
|
|
903
|
-
Root: G,
|
|
904
|
-
NestedRoot: Ce,
|
|
905
|
-
Content: q,
|
|
906
|
-
Overlay: K,
|
|
907
|
-
Trigger: n,
|
|
908
|
-
Portal: we,
|
|
909
|
-
Handle: J,
|
|
910
|
-
Close: c,
|
|
911
|
-
Title: s,
|
|
912
|
-
Description: o
|
|
913
|
-
};
|
|
914
|
-
//#endregion
|
|
915
|
-
//#region src/components/ui/drawer.tsx
|
|
916
|
-
function Te({ ...e }) {
|
|
917
|
-
return /* @__PURE__ */ m(Y.Root, {
|
|
918
|
-
"data-slot": "drawer",
|
|
919
|
-
...e
|
|
920
|
-
});
|
|
921
|
-
}
|
|
922
|
-
function X({ ...e }) {
|
|
923
|
-
return /* @__PURE__ */ m(Y.Trigger, {
|
|
924
|
-
"data-slot": "drawer-trigger",
|
|
925
|
-
...e
|
|
926
|
-
});
|
|
927
|
-
}
|
|
928
|
-
function Ee({ ...e }) {
|
|
929
|
-
return /* @__PURE__ */ m(Y.Portal, {
|
|
930
|
-
"data-slot": "drawer-portal",
|
|
931
|
-
...e
|
|
932
|
-
});
|
|
933
|
-
}
|
|
934
|
-
function De({ ...e }) {
|
|
935
|
-
return /* @__PURE__ */ m(Y.Close, {
|
|
936
|
-
"data-slot": "drawer-close",
|
|
937
|
-
...e
|
|
938
|
-
});
|
|
939
|
-
}
|
|
940
|
-
function Z({ className: t, ...n }) {
|
|
941
|
-
return /* @__PURE__ */ m(Y.Overlay, {
|
|
942
|
-
className: e("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1000 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", t),
|
|
943
|
-
"data-slot": "drawer-overlay",
|
|
944
|
-
...n
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
|
-
function Oe({ className: t, children: n, ...r }) {
|
|
948
|
-
return /* @__PURE__ */ h(Ee, {
|
|
949
|
-
"data-slot": "drawer-portal",
|
|
950
|
-
children: [/* @__PURE__ */ m(Z, {}), /* @__PURE__ */ m(Y.Content, {
|
|
951
|
-
className: e("group/drawer-content fixed z-1000 flex h-auto flex-col bg-white", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-0", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", t),
|
|
952
|
-
"data-slot": "drawer-content",
|
|
953
|
-
...r,
|
|
954
|
-
children: n
|
|
955
|
-
})]
|
|
956
|
-
});
|
|
957
|
-
}
|
|
958
|
-
function ke({ className: t, ...n }) {
|
|
959
|
-
return /* @__PURE__ */ m("div", {
|
|
960
|
-
className: e("flex flex-col gap-2 p-5", t),
|
|
961
|
-
"data-slot": "drawer-header",
|
|
962
|
-
...n
|
|
963
|
-
});
|
|
964
|
-
}
|
|
965
|
-
function Ae({ className: t, ...n }) {
|
|
966
|
-
return /* @__PURE__ */ m("div", {
|
|
967
|
-
className: e("mt-auto flex flex-col gap-2 p-5", t),
|
|
968
|
-
"data-slot": "drawer-footer",
|
|
969
|
-
...n
|
|
970
|
-
});
|
|
971
|
-
}
|
|
972
|
-
function je({ className: t, ...n }) {
|
|
973
|
-
return /* @__PURE__ */ m(Y.Title, {
|
|
974
|
-
className: e("font-semibold text-foreground", t),
|
|
975
|
-
"data-slot": "drawer-title",
|
|
976
|
-
...n
|
|
977
|
-
});
|
|
978
|
-
}
|
|
979
|
-
function Q({ className: t, ...n }) {
|
|
980
|
-
return /* @__PURE__ */ m(Y.Description, {
|
|
981
|
-
className: e("text-muted-foreground text-sm", t),
|
|
982
|
-
"data-slot": "drawer-description",
|
|
983
|
-
...n
|
|
984
|
-
});
|
|
985
|
-
}
|
|
986
|
-
//#endregion
|
|
987
|
-
export { Ae as a, Ee as c, Q as i, je as l, De as n, ke as o, Oe as r, Z as s, Te as t, X as u };
|