@loczer/storefront-sdk 0.170.0 → 0.172.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/chunks/ui/dist/{Dialog-CR_9vgBQ.js → Dialog-Dick1QiI.js} +3 -3
- package/dist/chunks/ui/dist/Drawer/{index-BxM7gmh_.js → index-C1-jGB62.js} +3 -3
- package/dist/chunks/ui/dist/{MorphingModalWizard-CPLr3dh2.js → MorphingModalWizard-V0zTc513.js} +1 -1
- package/dist/chunks/ui/dist/{ResponsiveDialog-DhFgsW_0.js → ResponsiveDialog-CYvYFO09.js} +2 -2
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/dialog/popup/{DialogPopup-Ce1MaHNd.js → DialogPopup-BcVKH4Ue.js} +1 -1
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/dialog/portal/{DialogPortal-DCoXyUCa.js → DialogPortal-DrO6okKE.js} +1 -1
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/dialog/root/{DialogRoot-DYrthiUT.js → DialogRoot-BknOXghA.js} +1 -1
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/dialog/root/{useDialogRoot-Dmki7CJG.js → useDialogRoot-B-GtnDcK.js} +1 -1
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/drawer/popup/{DrawerPopup-BXOe4Llu.js → DrawerPopup-CQgmpMbk.js} +1 -1
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/drawer/portal/{DrawerPortal-BfTFM1p8.js → DrawerPortal-CU-cCvvG.js} +1 -1
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/drawer/root/{DrawerRoot-DuO16Hl3.js → DrawerRoot-BKYspE2s.js} +1 -1
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/{FloatingFocusManager-B-v_gyUI.js → FloatingFocusManager-CVchZf30.js} +2 -2
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/components/{FloatingPortal-6JOqLjHM.js → FloatingPortal-CFYgcT1n.js} +1 -1
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/hooks/{useDismiss-BzvyAPc1.js → useDismiss-CZ9KGH30.js} +13 -13
- package/dist/chunks/ui/dist/node_modules/@base-ui/react/esm/floating-ui-react/utils/{tabbable-BUkXLKOZ.js → tabbable-Cepxs8CW.js} +9 -9
- package/dist/components/BookingBikeVariantDialog/index.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +3 -3
- package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
- package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +38 -38
- package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +3 -3
- package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
- package/dist/components/PoweredByLoczerBadge/index.js +22 -22
- package/dist/components/ProductWarningNotice/index.js +6 -6
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +1 -1
- package/dist/components/StorefrontPopupMessages/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/pages/CheckoutPaymentPage.js +1 -1
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +19 -11
- package/dist/pages/PaymentLinkSuccessPage.js +1 -1
- package/dist/storefront.css +1 -1
- package/dist/ui/day-picker.d.ts.map +1 -1
- package/dist/ui/day-picker.js +16 -21
- package/dist/ui/drawer.d.ts.map +1 -1
- package/dist/ui/drawer.js +59 -64
- package/package.json +3 -3
|
@@ -6,13 +6,13 @@ import { createAutoFocusHandler as C, composeRefs as w } from "./lib/slot-CklkPb
|
|
|
6
6
|
import { SsrHydratablePortal as H } from "./SsrHydratablePortal/index-Ue09qUAi.js";
|
|
7
7
|
import O from "./node_modules/lucide-react/dist/esm/icons/x-BDxS-rYd.js";
|
|
8
8
|
import { DialogBackdrop as z } from "./node_modules/@base-ui/react/esm/dialog/backdrop/DialogBackdrop-dfhPbhun.js";
|
|
9
|
-
import { DialogPortal as I } from "./node_modules/@base-ui/react/esm/dialog/portal/DialogPortal-
|
|
10
|
-
import { DialogPopup as T } from "./node_modules/@base-ui/react/esm/dialog/popup/DialogPopup-
|
|
9
|
+
import { DialogPortal as I } from "./node_modules/@base-ui/react/esm/dialog/portal/DialogPortal-DrO6okKE.js";
|
|
10
|
+
import { DialogPopup as T } from "./node_modules/@base-ui/react/esm/dialog/popup/DialogPopup-BcVKH4Ue.js";
|
|
11
11
|
import { DialogClose as k } from "./node_modules/@base-ui/react/esm/dialog/close/DialogClose-CiEiuP0S.js";
|
|
12
12
|
import { DialogTitle as $ } from "./node_modules/@base-ui/react/esm/dialog/title/DialogTitle-BYe_-O2U.js";
|
|
13
13
|
import { DialogDescription as j } from "./node_modules/@base-ui/react/esm/dialog/description/DialogDescription-C793yEmX.js";
|
|
14
14
|
import { DialogTrigger as E } from "./node_modules/@base-ui/react/esm/dialog/trigger/DialogTrigger-CDsWAaqd.js";
|
|
15
|
-
import { DialogRoot as M } from "./node_modules/@base-ui/react/esm/dialog/root/DialogRoot-
|
|
15
|
+
import { DialogRoot as M } from "./node_modules/@base-ui/react/esm/dialog/root/DialogRoot-BknOXghA.js";
|
|
16
16
|
const y = s.createContext({
|
|
17
17
|
open: !1,
|
|
18
18
|
setOpen: () => {
|
|
@@ -7,12 +7,12 @@ import { DrawerTrigger as C } from "../node_modules/@base-ui/react/esm/drawer/tr
|
|
|
7
7
|
import { DrawerClose as k } from "../node_modules/@base-ui/react/esm/drawer/close/DrawerClose-K9toitLg.js";
|
|
8
8
|
import { DrawerBackdrop as R } from "../node_modules/@base-ui/react/esm/drawer/backdrop/DrawerBackdrop-BqcC6xGK.js";
|
|
9
9
|
import { DrawerViewport as P } from "../node_modules/@base-ui/react/esm/drawer/viewport/DrawerViewport-BA1WyQud.js";
|
|
10
|
-
import { DrawerPopup as O } from "../node_modules/@base-ui/react/esm/drawer/popup/DrawerPopup-
|
|
10
|
+
import { DrawerPopup as O } from "../node_modules/@base-ui/react/esm/drawer/popup/DrawerPopup-CQgmpMbk.js";
|
|
11
11
|
import { DrawerContent as T } from "../node_modules/@base-ui/react/esm/drawer/content/DrawerContent-DAER5HEH.js";
|
|
12
12
|
import { DrawerTitle as z } from "../node_modules/@base-ui/react/esm/drawer/title/DrawerTitle-DPojAJP6.js";
|
|
13
13
|
import { DrawerDescription as V } from "../node_modules/@base-ui/react/esm/drawer/description/DrawerDescription-CmzTECJs.js";
|
|
14
|
-
import { DrawerPortal as E } from "../node_modules/@base-ui/react/esm/drawer/portal/DrawerPortal-
|
|
15
|
-
import { DrawerRoot as F } from "../node_modules/@base-ui/react/esm/drawer/root/DrawerRoot-
|
|
14
|
+
import { DrawerPortal as E } from "../node_modules/@base-ui/react/esm/drawer/portal/DrawerPortal-CU-cCvvG.js";
|
|
15
|
+
import { DrawerRoot as F } from "../node_modules/@base-ui/react/esm/drawer/root/DrawerRoot-BKYspE2s.js";
|
|
16
16
|
const g = o.createContext("bottom"), h = o.createContext({
|
|
17
17
|
open: !1,
|
|
18
18
|
modal: !0
|
package/dist/chunks/ui/dist/{MorphingModalWizard-CPLr3dh2.js → MorphingModalWizard-V0zTc513.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import { createContext as o, useContext as r } from "react";
|
|
3
3
|
import "./Button-CEl4MEmL.js";
|
|
4
|
-
import "./Dialog-
|
|
4
|
+
import "./Dialog-Dick1QiI.js";
|
|
5
5
|
import "./node_modules/@base-ui/react/esm/scroll-area/root/ScrollAreaRoot-Cw_gyhhI.js";
|
|
6
6
|
import "./node_modules/@base-ui/react/esm/scroll-area/viewport/ScrollAreaViewport-CadjBxEp.js";
|
|
7
7
|
import "./node_modules/@base-ui/react/esm/scroll-area/corner/ScrollAreaCorner-z0cNScNF.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as R } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import { DialogTrigger as h, DialogClose as w, DialogContent as b, DialogTitle as y, DialogDescription as M, Dialog as E, DialogHeader as O, DialogFooter as T } from "./Dialog-
|
|
4
|
-
import { DrawerTrigger as I, DrawerClose as N, DrawerContent as _, DrawerTitle as x, DrawerDescription as $, Drawer as H, DrawerHeader as P, DrawerFooter as k } from "./Drawer/index-
|
|
3
|
+
import { DialogTrigger as h, DialogClose as w, DialogContent as b, DialogTitle as y, DialogDescription as M, Dialog as E, DialogHeader as O, DialogFooter as T } from "./Dialog-Dick1QiI.js";
|
|
4
|
+
import { DrawerTrigger as I, DrawerClose as N, DrawerContent as _, DrawerTitle as x, DrawerDescription as $, Drawer as H, DrawerHeader as P, DrawerFooter as k } from "./Drawer/index-C1-jGB62.js";
|
|
5
5
|
import { useMediaQuery as B } from "./lib/useMediaQuery-DhKGnWgn.js";
|
|
6
6
|
import { cn as m } from "./lib/utils-B6zhukbw.js";
|
|
7
7
|
import L from "./node_modules/lucide-react/dist/esm/icons/x-BDxS-rYd.js";
|
|
@@ -9,7 +9,7 @@ import { useDialogPortalContext as N } from "../portal/DialogPortalContext-CtWBu
|
|
|
9
9
|
import { useOpenChangeComplete as $ } from "../../internals/useOpenChangeComplete-Doxu2x_W.js";
|
|
10
10
|
import { COMPOSITE_KEYS as K } from "../../internals/composite/composite-Bl9mbNwg.js";
|
|
11
11
|
import { jsx as _ } from "react/jsx-runtime";
|
|
12
|
-
import { FloatingFocusManager as j } from "../../floating-ui-react/components/FloatingFocusManager-
|
|
12
|
+
import { FloatingFocusManager as j } from "../../floating-ui-react/components/FloatingFocusManager-CVchZf30.js";
|
|
13
13
|
const k = {
|
|
14
14
|
...h,
|
|
15
15
|
...M,
|
|
@@ -4,7 +4,7 @@ import { useDialogRootContext as f } from "../root/DialogRootContext-D__rrg4-.js
|
|
|
4
4
|
import { DialogPortalContext as c } from "./DialogPortalContext-CtWBuvRl.js";
|
|
5
5
|
import { InternalBackdrop as u } from "../../utils/InternalBackdrop-CZUtC9bU.js";
|
|
6
6
|
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
7
|
-
import { FloatingPortal as g } from "../../floating-ui-react/components/FloatingPortal-
|
|
7
|
+
import { FloatingPortal as g } from "../../floating-ui-react/components/FloatingPortal-CFYgcT1n.js";
|
|
8
8
|
const x = /* @__PURE__ */ m.forwardRef(function(r, n) {
|
|
9
9
|
const {
|
|
10
10
|
keepMounted: e = !1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
2
|
import { useOnFirstRender as h } from "../../../../utils/esm/useOnFirstRender-IB3XPZ7h.js";
|
|
3
|
-
import { useDialogRoot as v } from "./useDialogRoot-
|
|
3
|
+
import { useDialogRoot as v } from "./useDialogRoot-B-GtnDcK.js";
|
|
4
4
|
import { useDialogRootContext as R, DialogRootContext as O } from "./DialogRootContext-D__rrg4-.js";
|
|
5
5
|
import { DialogStore as b } from "../store/DialogStore-ltMcMpnh.js";
|
|
6
6
|
import { jsx as m } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import { createChangeEventDetails as M } from "../../internals/createBaseUIEvent
|
|
|
5
5
|
import { useImplicitActiveTrigger as A, useOpenStateTransitions as w } from "../../utils/popups/popupStoreUtils-DSjS8g02.js";
|
|
6
6
|
import { useSyncedFloatingRootContext as B } from "../../floating-ui-react/hooks/useSyncedFloatingRootContext-Cczfd0Dg.js";
|
|
7
7
|
import { useRole as F } from "../../floating-ui-react/hooks/useRole-DfMbRaU2.js";
|
|
8
|
-
import { useDismiss as H } from "../../floating-ui-react/hooks/useDismiss-
|
|
8
|
+
import { useDismiss as H } from "../../floating-ui-react/hooks/useDismiss-CZ9KGH30.js";
|
|
9
9
|
import { getTarget as K, contains as L } from "../../internals/shadowDom-DTBRPFkJ.js";
|
|
10
10
|
import { useInteractions as U } from "../../floating-ui-react/hooks/useInteractions-BWCpGAad.js";
|
|
11
11
|
import { imperativeAction as V } from "../../internals/reason-parts-DKJ_-O8k.js";
|
|
@@ -18,7 +18,7 @@ import { useDrawerRootContext as de } from "../root/DrawerRootContext-Cyaf-7qv.j
|
|
|
18
18
|
import { useDrawerSnapPoints as we } from "../root/useDrawerSnapPoints-CVbKGPMi.js";
|
|
19
19
|
import { useDrawerViewportContext as ge } from "../viewport/DrawerViewportContext-xR35hPcl.js";
|
|
20
20
|
import { jsx as Se } from "react/jsx-runtime";
|
|
21
|
-
import { FloatingFocusManager as De } from "../../floating-ui-react/components/FloatingFocusManager-
|
|
21
|
+
import { FloatingFocusManager as De } from "../../floating-ui-react/components/FloatingFocusManager-CVchZf30.js";
|
|
22
22
|
let K = !1;
|
|
23
23
|
function he() {
|
|
24
24
|
K || (typeof CSS < "u" && "registerProperty" in CSS && ([s.swipeMovementX, s.swipeMovementY, s.snapPointOffset].forEach((t) => {
|
|
@@ -5,7 +5,7 @@ import { useStableCallback as i } from "../../../../utils/esm/useStableCallback-
|
|
|
5
5
|
import { isAndroid as ie } from "../../../../utils/esm/detectBrowser-CntSiJrj.js";
|
|
6
6
|
import { useId as le } from "../../../../utils/esm/useId-D8NyJjt3.js";
|
|
7
7
|
import { useDrawerRootContext as ue, DrawerRootContext as pe } from "./DrawerRootContext-Cyaf-7qv.js";
|
|
8
|
-
import { IsDrawerContext as fe, DialogRoot as de } from "../../dialog/root/DialogRoot-
|
|
8
|
+
import { IsDrawerContext as fe, DialogRoot as de } from "../../dialog/root/DialogRoot-BknOXghA.js";
|
|
9
9
|
import { createChangeEventDetails as x } from "../../internals/createBaseUIEventDetails-WO93mcXE.js";
|
|
10
10
|
import { useDialogRootContext as ge } from "../../dialog/root/DialogRootContext-D__rrg4-.js";
|
|
11
11
|
import { useDrawerProviderContext as me } from "../provider/DrawerProviderContext-euW_U5h8.js";
|
|
@@ -13,14 +13,14 @@ import { ownerDocument as O } from "../../../../utils/esm/owner-CfKP3-Rk.js";
|
|
|
13
13
|
import { FocusGuard as ve } from "../../utils/FocusGuard-BkeVKSkX.js";
|
|
14
14
|
import { isTypeableCombobox as ye, getFloatingFocusElement as he, isTypeableElement as ze } from "../utils/element-7_beKIST.js";
|
|
15
15
|
import { isVirtualClick as Je, isVirtualPointerEvent as Qe, stopEvent as Xe } from "../utils/event-BJf3Eroa.js";
|
|
16
|
-
import { tabbable as Me, isOutsideEvent as Te, getNextTabbable as Ye, getPreviousTabbable as Ze, isTabbable as se, focusable as Be } from "../utils/tabbable-
|
|
16
|
+
import { tabbable as Me, isOutsideEvent as Te, getNextTabbable as Ye, getPreviousTabbable as Ze, isTabbable as se, focusable as Be } from "../utils/tabbable-Cepxs8CW.js";
|
|
17
17
|
import { getNodeAncestors as Fe, getNodeChildren as ke } from "../utils/nodes-BbaFB8UD.js";
|
|
18
18
|
import { isElementVisible as et } from "../utils/composite-keZdnJD9.js";
|
|
19
19
|
import { createChangeEventDetails as tt } from "../../internals/createBaseUIEventDetails-WO93mcXE.js";
|
|
20
20
|
import { createAttribute as Ae } from "../utils/createAttribute-DQjmnndx.js";
|
|
21
21
|
import { enqueueFocus as ne } from "../utils/enqueueFocus-BoxfANJQ.js";
|
|
22
22
|
import { markOthers as Oe } from "../utils/markOthers-im_zgP9x.js";
|
|
23
|
-
import { usePortalContext as rt } from "./FloatingPortal-
|
|
23
|
+
import { usePortalContext as rt } from "./FloatingPortal-CFYgcT1n.js";
|
|
24
24
|
import { useFloatingTree as nt } from "./FloatingTree-BJGeWpX5.js";
|
|
25
25
|
import { CLICK_TRIGGER_IDENTIFIER as ot } from "../../internals/constants-DrTrmCr_.js";
|
|
26
26
|
import { resolveRef as C } from "../../utils/resolveRef-Csx4Vghu.js";
|
|
@@ -8,7 +8,7 @@ import { useIsoLayoutEffect as j } from "../../../../utils/esm/useIsoLayoutEffec
|
|
|
8
8
|
import { useStableCallback as w } from "../../../../utils/esm/useStableCallback-DyHa2qMJ.js";
|
|
9
9
|
import { EMPTY_OBJECT as q } from "../../../../utils/esm/empty-C3-x9M2q.js";
|
|
10
10
|
import { FocusGuard as x } from "../../utils/FocusGuard-BkeVKSkX.js";
|
|
11
|
-
import { enableFocusInside as I, isOutsideEvent as $, getPreviousTabbable as G, getNextTabbable as L, disableFocusInside as W } from "../utils/tabbable-
|
|
11
|
+
import { enableFocusInside as I, isOutsideEvent as $, getPreviousTabbable as G, getNextTabbable as L, disableFocusInside as W } from "../utils/tabbable-Cepxs8CW.js";
|
|
12
12
|
import { createChangeEventDetails as k } from "../../internals/createBaseUIEventDetails-WO93mcXE.js";
|
|
13
13
|
import { createAttribute as A } from "../utils/createAttribute-DQjmnndx.js";
|
|
14
14
|
import { useRenderElement as B } from "../../internals/useRenderElement-CktkgllD.js";
|
|
@@ -37,8 +37,8 @@ function mt(p, Ee = {}) {
|
|
|
37
37
|
referencePress: ye = ze,
|
|
38
38
|
referencePressEvent: B = "sloppy",
|
|
39
39
|
bubbles: Re,
|
|
40
|
-
externalTree:
|
|
41
|
-
} = Ee, R = Ge(
|
|
40
|
+
externalTree: we
|
|
41
|
+
} = Ee, R = Ge(we), be = y(typeof K == "function" ? K : () => !1), w = typeof K == "function" ? be : K, re = w !== !1, oe = y(() => he), M = l.useRef(!1), S = l.useRef(!1), v = l.useRef(!1), {
|
|
42
42
|
escapeKey: W,
|
|
43
43
|
outsidePress: se
|
|
44
44
|
} = Ve(Re), o = l.useRef(null), $ = pe(), ce = pe(), E = y(() => {
|
|
@@ -56,7 +56,7 @@ function mt(p, Ee = {}) {
|
|
|
56
56
|
}
|
|
57
57
|
const U = Fe(r) ? r.nativeEvent : r, D = I(Qe, U);
|
|
58
58
|
n.setOpen(!1, D), !W && !D.isPropagationAllowed && r.stopPropagation();
|
|
59
|
-
}),
|
|
59
|
+
}), b = y(() => {
|
|
60
60
|
d.current.insideReactTree = !0, ce.start(0, E);
|
|
61
61
|
});
|
|
62
62
|
l.useEffect(() => {
|
|
@@ -132,7 +132,7 @@ function mt(p, Ee = {}) {
|
|
|
132
132
|
h.clear(), v.current = !1;
|
|
133
133
|
return;
|
|
134
134
|
}
|
|
135
|
-
if (typeof
|
|
135
|
+
if (typeof w == "function" && !w(e))
|
|
136
136
|
return;
|
|
137
137
|
const Oe = d.current.floatingContext?.nodeId, le = R ? ee(R.nodesRef.current, Oe) : [];
|
|
138
138
|
if (le.length > 0) {
|
|
@@ -191,7 +191,7 @@ function mt(p, Ee = {}) {
|
|
|
191
191
|
D();
|
|
192
192
|
return;
|
|
193
193
|
}
|
|
194
|
-
typeof
|
|
194
|
+
typeof w == "function" && !w(e) || (h.clear(), v.current = !0, E());
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
}
|
|
@@ -217,7 +217,7 @@ function mt(p, Ee = {}) {
|
|
|
217
217
|
return () => {
|
|
218
218
|
ke(), r.clear(), h.clear(), x(), v.current = !1;
|
|
219
219
|
};
|
|
220
|
-
}, [d, ne, A, re,
|
|
220
|
+
}, [d, ne, A, re, w, C, g, W, se, P, E, oe, R, n, $]), l.useEffect(E, [w, E]);
|
|
221
221
|
const G = l.useMemo(() => ({
|
|
222
222
|
onKeyDown: P,
|
|
223
223
|
[je[B]]: (r) => {
|
|
@@ -242,17 +242,17 @@ function mt(p, Ee = {}) {
|
|
|
242
242
|
// See https://github.com/mui/base-ui/pull/3379
|
|
243
243
|
onPointerDown: Q,
|
|
244
244
|
onMouseDown: Q,
|
|
245
|
-
onClickCapture:
|
|
245
|
+
onClickCapture: b,
|
|
246
246
|
onMouseDownCapture(r) {
|
|
247
|
-
|
|
247
|
+
b(), J(r);
|
|
248
248
|
},
|
|
249
249
|
onPointerDownCapture(r) {
|
|
250
|
-
|
|
250
|
+
b(), J(r);
|
|
251
251
|
},
|
|
252
|
-
onMouseUpCapture:
|
|
253
|
-
onTouchEndCapture:
|
|
254
|
-
onTouchMoveCapture:
|
|
255
|
-
}), [P,
|
|
252
|
+
onMouseUpCapture: b,
|
|
253
|
+
onTouchEndCapture: b,
|
|
254
|
+
onTouchMoveCapture: b
|
|
255
|
+
}), [P, b, J, Q]);
|
|
256
256
|
return l.useMemo(() => g ? {
|
|
257
257
|
reference: G,
|
|
258
258
|
floating: ie,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { isHTMLElement as s, getNodeName as a, isShadowRoot as A, getComputedStyle as v } from "../../../../../@floating-ui/utils/dist/floating-ui.utils.dom-BULZuLW5.js";
|
|
2
2
|
import { ownerDocument as f } from "../../../../utils/esm/owner-CfKP3-Rk.js";
|
|
3
3
|
import { contains as l, activeElement as T } from "../../internals/shadowDom-DTBRPFkJ.js";
|
|
4
|
-
import { isElementVisible as
|
|
5
|
-
const
|
|
6
|
-
function
|
|
4
|
+
import { isElementVisible as $ } from "./composite-keZdnJD9.js";
|
|
5
|
+
const w = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';
|
|
6
|
+
function R(n) {
|
|
7
7
|
const e = n.assignedSlot;
|
|
8
8
|
if (e)
|
|
9
9
|
return e;
|
|
@@ -18,27 +18,27 @@ function c(n) {
|
|
|
18
18
|
return e;
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function S(n, e) {
|
|
22
22
|
const t = c(e);
|
|
23
23
|
return !!t && (n === t || l(t, n));
|
|
24
24
|
}
|
|
25
25
|
function d(n) {
|
|
26
26
|
const e = n ? a(n) : "";
|
|
27
|
-
return n != null && n.matches(
|
|
27
|
+
return n != null && n.matches(w) && (e !== "summary" || n.parentElement != null && a(n.parentElement) === "details" && c(n.parentElement) === n) && (e !== "details" || c(n) == null) && (e !== "input" || n.type !== "hidden");
|
|
28
28
|
}
|
|
29
29
|
function m(n) {
|
|
30
30
|
if (!d(n) || !n.isConnected || n.matches(":disabled"))
|
|
31
31
|
return !1;
|
|
32
|
-
for (let e = n; e; e =
|
|
32
|
+
for (let e = n; e; e = R(e)) {
|
|
33
33
|
const t = e !== n, r = a(e) === "slot";
|
|
34
|
-
if (e.hasAttribute("inert") || t && a(e) === "details" && !e.open && !
|
|
34
|
+
if (e.hasAttribute("inert") || t && a(e) === "details" && !e.open && !S(n, e) || e.hasAttribute("hidden") || !r && !N(e, t))
|
|
35
35
|
return !1;
|
|
36
36
|
}
|
|
37
37
|
return !0;
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function N(n, e) {
|
|
40
40
|
const t = v(n);
|
|
41
|
-
return e ? t.display !== "none" :
|
|
41
|
+
return e ? t.display !== "none" : $(n, t);
|
|
42
42
|
}
|
|
43
43
|
function b(n) {
|
|
44
44
|
const e = n.tabIndex;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { useState as O, useEffect as q } from "react";
|
|
3
3
|
import { useMediaQuery as K } from "@rpcbase/client";
|
|
4
|
-
import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as T, ResponsiveDialog as G, ResponsiveDialogContent as W, ResponsiveDialogHeader as F, ResponsiveDialogTitle as H, ResponsiveDialogDescription as U, ResponsiveDialogFooter as X } from "../../chunks/ui/dist/ResponsiveDialog-
|
|
4
|
+
import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as T, ResponsiveDialog as G, ResponsiveDialogContent as W, ResponsiveDialogHeader as F, ResponsiveDialogTitle as H, ResponsiveDialogDescription as U, ResponsiveDialogFooter as X } from "../../chunks/ui/dist/ResponsiveDialog-CYvYFO09.js";
|
|
5
5
|
import { cn as S } from "@rpcbase/ui";
|
|
6
6
|
import { Bike as Y, CheckCircle2 as I, Plus as V } from "lucide-react";
|
|
7
7
|
import { useTranslation as Z } from "react-i18next";
|
|
@@ -2,7 +2,7 @@ import { jsxs as ne, jsx as s } from "react/jsx-runtime";
|
|
|
2
2
|
import { differenceInCalendarDays as me } from "date-fns";
|
|
3
3
|
import { createContext as pe, useRef as F, useState as X, useEffect as v, useContext as ye } from "react";
|
|
4
4
|
import { cn as k, DayPickerField as De } from "@rpcbase/ui";
|
|
5
|
-
import { useMorphingModalWizardOverlayLayer as Ee } from "../../../chunks/ui/dist/MorphingModalWizard-
|
|
5
|
+
import { useMorphingModalWizardOverlayLayer as Ee } from "../../../chunks/ui/dist/MorphingModalWizard-V0zTc513.js";
|
|
6
6
|
import { DayPicker as he } from "../../../ui/day-picker.js";
|
|
7
7
|
import { Label as ve } from "../../../ui/label.js";
|
|
8
8
|
import { Provider as be, Root as ge, TooltipTrigger as Me, Content as ke } from "../../../ui/tooltip.js";
|
|
@@ -328,7 +328,7 @@ const qe = () => {
|
|
|
328
328
|
showOutsideDays: !1,
|
|
329
329
|
numberOfMonths: l,
|
|
330
330
|
disabled: (e) => i && e < i || e < U,
|
|
331
|
-
|
|
331
|
+
autoFocus: !0,
|
|
332
332
|
"data-testid": "end-date-calendar"
|
|
333
333
|
},
|
|
334
334
|
portalContainer: S
|
|
@@ -381,7 +381,7 @@ const qe = () => {
|
|
|
381
381
|
showOutsideDays: !1,
|
|
382
382
|
numberOfMonths: l,
|
|
383
383
|
disabled: (e) => i && e < i || e < U,
|
|
384
|
-
|
|
384
|
+
autoFocus: !0,
|
|
385
385
|
"data-testid": "end-date-calendar"
|
|
386
386
|
}
|
|
387
387
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as M, Fragment as w, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as P, useEffect as N } from "react";
|
|
3
3
|
import { cn as T, HourPickerField as V } from "@rpcbase/ui";
|
|
4
|
-
import { useMorphingModalWizardOverlayLayer as H } from "../../../chunks/ui/dist/MorphingModalWizard-
|
|
4
|
+
import { useMorphingModalWizardOverlayLayer as H } from "../../../chunks/ui/dist/MorphingModalWizard-V0zTc513.js";
|
|
5
5
|
import { Label as U } from "../../../ui/label.js";
|
|
6
6
|
import { useBookingPeriod as A } from "../BookingPeriodContext.js";
|
|
7
7
|
import { BookingPeriodFieldErrorMessage as j } from "./BookingPeriodFieldErrorMessage.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useState as z, useRef as R, useEffect as D } from "react";
|
|
3
3
|
import { startOfMonth as s, differenceInCalendarDays as Z, isSameDay as w, endOfMonth as H, addMonths as V } from "date-fns";
|
|
4
4
|
import { DayButton as ee } from "react-day-picker";
|
|
5
5
|
import { cn as f } from "@rpcbase/ui";
|
|
6
6
|
import { buttonVariants as te, Button as T } from "../../../ui/button.js";
|
|
7
7
|
import { DayPicker as F } from "../../../ui/day-picker.js";
|
|
8
|
-
import { Drawer as oe, DrawerContent as ne, DrawerHeader as ae, DrawerTitle as
|
|
9
|
-
import { useBookingPeriod as
|
|
8
|
+
import { Drawer as oe, DrawerContent as ne, DrawerHeader as ae, DrawerTitle as re } from "../../../ui/drawer.js";
|
|
9
|
+
import { useBookingPeriod as le } from "../BookingPeriodContext.js";
|
|
10
10
|
const se = ee, K = 1, P = f(
|
|
11
11
|
te({ variant: "outline" }),
|
|
12
12
|
"z-10 h-11 w-11 bg-background p-0 opacity-100 shadow-sm [&_svg]:size-5"
|
|
@@ -45,20 +45,20 @@ const se = ee, K = 1, P = f(
|
|
|
45
45
|
dateLocale: S,
|
|
46
46
|
isMobile: k,
|
|
47
47
|
withMobileDateDrawer: B,
|
|
48
|
-
minSelectableDate:
|
|
49
|
-
} =
|
|
50
|
-
Y(n, a,
|
|
48
|
+
minSelectableDate: d
|
|
49
|
+
} = le(), i = B && k && (N || C), l = C && !N ? "end" : "start", G = I(d), h = I(
|
|
50
|
+
Y(n, a, d)
|
|
51
51
|
), [J, O] = z(
|
|
52
|
-
() => s(
|
|
52
|
+
() => s(d)
|
|
53
53
|
), [Q, p] = z(
|
|
54
54
|
() => g(h)
|
|
55
55
|
), y = R(!0), v = R(!1), _ = n && (a ?? n) >= n ? Z(a ?? n, n) + 1 : null, j = a ?? n;
|
|
56
56
|
if (D(() => {
|
|
57
|
-
!
|
|
58
|
-
}, [
|
|
59
|
-
!
|
|
60
|
-
}, [
|
|
61
|
-
if (!
|
|
57
|
+
!i || l !== "start" || O(s(d));
|
|
58
|
+
}, [l, i, G]), D(() => {
|
|
59
|
+
!i || l !== "end" || p(g(h));
|
|
60
|
+
}, [l, h, i]), D(() => {
|
|
61
|
+
if (!i || typeof document > "u")
|
|
62
62
|
return;
|
|
63
63
|
const e = window.scrollY, { body: t, documentElement: u } = document, m = {
|
|
64
64
|
overflow: t.style.overflow,
|
|
@@ -69,7 +69,7 @@ const se = ee, K = 1, P = f(
|
|
|
69
69
|
return y.current = !0, t.style.overflow = "hidden", t.style.position = "fixed", t.style.top = `-${e}px`, t.style.width = "100%", u.style.overscrollBehavior = "none", () => {
|
|
70
70
|
t.style.overflow = m.overflow, t.style.position = m.position, t.style.top = m.top, t.style.width = m.width, u.style.overscrollBehavior = X, y.current && window.scrollTo(0, e);
|
|
71
71
|
};
|
|
72
|
-
}, [
|
|
72
|
+
}, [i]), !B || !k)
|
|
73
73
|
return null;
|
|
74
74
|
const x = (e) => {
|
|
75
75
|
if (e === "end") {
|
|
@@ -91,7 +91,7 @@ const se = ee, K = 1, P = f(
|
|
|
91
91
|
className: f(e.className, "overflow-visible"),
|
|
92
92
|
children: [
|
|
93
93
|
e.children,
|
|
94
|
-
t ? /* @__PURE__ */
|
|
94
|
+
t ? /* @__PURE__ */ r(
|
|
95
95
|
"span",
|
|
96
96
|
{
|
|
97
97
|
className: "pointer-events-none absolute left-1/2 top-0 z-[70] -translate-x-1/2 -translate-y-[calc(100%+4px)] whitespace-nowrap rounded-md border bg-popover px-2 py-1 text-xs font-semibold text-primary shadow-md",
|
|
@@ -103,54 +103,54 @@ const se = ee, K = 1, P = f(
|
|
|
103
103
|
}
|
|
104
104
|
);
|
|
105
105
|
};
|
|
106
|
-
return /* @__PURE__ */
|
|
106
|
+
return /* @__PURE__ */ r(
|
|
107
107
|
oe,
|
|
108
108
|
{
|
|
109
|
-
open:
|
|
109
|
+
open: i,
|
|
110
110
|
lockScroll: !1,
|
|
111
111
|
onOpenChange: (e) => {
|
|
112
112
|
e || U();
|
|
113
113
|
},
|
|
114
114
|
children: /* @__PURE__ */ c(ne, { className: "overflow-hidden", children: [
|
|
115
115
|
/* @__PURE__ */ c(ae, { className: "border-b px-4 pb-3 pt-4 text-left", children: [
|
|
116
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ r(re, { className: "sr-only", children: l === "start" ? o.startDate : o.endDate }),
|
|
117
117
|
/* @__PURE__ */ c(
|
|
118
118
|
"div",
|
|
119
119
|
{
|
|
120
120
|
className: "relative grid grid-cols-2 rounded-md bg-muted p-1",
|
|
121
121
|
"aria-label": o.rentalPeriod,
|
|
122
122
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ r(
|
|
124
124
|
"span",
|
|
125
125
|
{
|
|
126
126
|
"aria-hidden": "true",
|
|
127
127
|
className: f(
|
|
128
128
|
"absolute inset-y-1 left-1 w-[calc(50%-0.25rem)] rounded bg-background shadow-sm transition-transform duration-300 ease-out",
|
|
129
|
-
|
|
129
|
+
l === "end" && "translate-x-full"
|
|
130
130
|
)
|
|
131
131
|
}
|
|
132
132
|
),
|
|
133
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ r(
|
|
134
134
|
"button",
|
|
135
135
|
{
|
|
136
136
|
type: "button",
|
|
137
|
-
"aria-pressed":
|
|
137
|
+
"aria-pressed": l === "start",
|
|
138
138
|
className: f(
|
|
139
139
|
"relative z-10 h-9 rounded px-3 text-sm font-medium transition-colors",
|
|
140
|
-
|
|
140
|
+
l === "start" ? "text-foreground" : "text-muted-foreground"
|
|
141
141
|
),
|
|
142
142
|
onClick: () => x("start"),
|
|
143
143
|
children: o.startDate
|
|
144
144
|
}
|
|
145
145
|
),
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ r(
|
|
147
147
|
"button",
|
|
148
148
|
{
|
|
149
149
|
type: "button",
|
|
150
|
-
"aria-pressed":
|
|
150
|
+
"aria-pressed": l === "end",
|
|
151
151
|
className: f(
|
|
152
152
|
"relative z-10 h-9 rounded px-3 text-sm font-medium transition-colors",
|
|
153
|
-
|
|
153
|
+
l === "end" ? "text-foreground" : "text-muted-foreground"
|
|
154
154
|
),
|
|
155
155
|
onClick: () => x("end"),
|
|
156
156
|
children: o.endDate
|
|
@@ -160,16 +160,16 @@ const se = ee, K = 1, P = f(
|
|
|
160
160
|
}
|
|
161
161
|
)
|
|
162
162
|
] }),
|
|
163
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ r("div", { className: "overflow-hidden px-4 py-4", children: /* @__PURE__ */ c(
|
|
164
164
|
"div",
|
|
165
165
|
{
|
|
166
166
|
className: f(
|
|
167
167
|
"flex w-[200%] transition-transform duration-300 ease-out",
|
|
168
|
-
|
|
168
|
+
l === "end" && "-translate-x-1/2"
|
|
169
169
|
),
|
|
170
170
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ r("section", { className: "max-h-[calc(95dvh-9rem)] w-1/2 shrink-0 overflow-y-auto pr-4", children: /* @__PURE__ */ c("div", { className: "flex flex-col gap-4", children: [
|
|
172
|
+
/* @__PURE__ */ r(
|
|
173
173
|
F,
|
|
174
174
|
{
|
|
175
175
|
id: "start-date-calendar",
|
|
@@ -181,11 +181,11 @@ const se = ee, K = 1, P = f(
|
|
|
181
181
|
selected: n,
|
|
182
182
|
month: J,
|
|
183
183
|
onMonthChange: (e) => O(s(e)),
|
|
184
|
-
disabled: (e) => e <
|
|
184
|
+
disabled: (e) => e < d,
|
|
185
185
|
onSelect: (e) => {
|
|
186
186
|
const t = e ?? void 0, u = t != null && (n == null || !w(t, n)), m = A(t);
|
|
187
187
|
u && (v.current = !1), p(
|
|
188
|
-
Y(t, a,
|
|
188
|
+
Y(t, a, d)
|
|
189
189
|
), q(t, {
|
|
190
190
|
close: !1,
|
|
191
191
|
openEndDatePicker: !1
|
|
@@ -194,13 +194,13 @@ const se = ee, K = 1, P = f(
|
|
|
194
194
|
commit: !1
|
|
195
195
|
});
|
|
196
196
|
},
|
|
197
|
-
|
|
197
|
+
autoFocus: !0,
|
|
198
198
|
"data-testid": "start-date-calendar",
|
|
199
199
|
className: "w-full p-0",
|
|
200
200
|
classNames: $
|
|
201
201
|
}
|
|
202
202
|
),
|
|
203
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ r(
|
|
204
204
|
T,
|
|
205
205
|
{
|
|
206
206
|
type: "button",
|
|
@@ -214,8 +214,8 @@ const se = ee, K = 1, P = f(
|
|
|
214
214
|
}
|
|
215
215
|
)
|
|
216
216
|
] }) }),
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ r("section", { className: "max-h-[calc(95dvh-9rem)] w-1/2 shrink-0 overflow-y-auto pl-4", children: /* @__PURE__ */ c("div", { className: "flex flex-col gap-4", children: [
|
|
218
|
+
/* @__PURE__ */ r(
|
|
219
219
|
F,
|
|
220
220
|
{
|
|
221
221
|
id: "end-date-calendar",
|
|
@@ -229,14 +229,14 @@ const se = ee, K = 1, P = f(
|
|
|
229
229
|
},
|
|
230
230
|
month: Q,
|
|
231
231
|
onMonthChange: (e) => p(s(e)),
|
|
232
|
-
disabled: (e) => n && e < n || e <
|
|
232
|
+
disabled: (e) => n && e < n || e < d,
|
|
233
233
|
onSelect: (e, t) => {
|
|
234
234
|
v.current = !0, b(t ?? void 0, {
|
|
235
235
|
close: !1,
|
|
236
236
|
commit: !1
|
|
237
237
|
});
|
|
238
238
|
},
|
|
239
|
-
|
|
239
|
+
autoFocus: !0,
|
|
240
240
|
"data-testid": "end-date-calendar",
|
|
241
241
|
className: "w-full p-0",
|
|
242
242
|
classNames: $,
|
|
@@ -246,7 +246,7 @@ const se = ee, K = 1, P = f(
|
|
|
246
246
|
},
|
|
247
247
|
h
|
|
248
248
|
),
|
|
249
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ r(
|
|
250
250
|
T,
|
|
251
251
|
{
|
|
252
252
|
type: "button",
|
|
@@ -2,7 +2,7 @@ import { jsxs as I, jsx as u } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as L, useState as A, useEffect as H } from "react";
|
|
3
3
|
import { DayButton as U } from "react-day-picker";
|
|
4
4
|
import { cn as f, DayPickerField as K } from "@rpcbase/ui";
|
|
5
|
-
import { useMorphingModalWizardOverlayLayer as R } from "../../../chunks/ui/dist/MorphingModalWizard-
|
|
5
|
+
import { useMorphingModalWizardOverlayLayer as R } from "../../../chunks/ui/dist/MorphingModalWizard-V0zTc513.js";
|
|
6
6
|
import { DayPicker as v } from "../../../ui/day-picker.js";
|
|
7
7
|
import { Label as _ } from "../../../ui/label.js";
|
|
8
8
|
import { useBookingPeriod as $ } from "../BookingPeriodContext.js";
|
|
@@ -137,7 +137,7 @@ const y = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), z = (e) =
|
|
|
137
137
|
DayButton: k
|
|
138
138
|
},
|
|
139
139
|
disabled: (a) => a < w,
|
|
140
|
-
|
|
140
|
+
autoFocus: !0,
|
|
141
141
|
"data-testid": "start-date-calendar"
|
|
142
142
|
},
|
|
143
143
|
portalContainer: E
|
|
@@ -169,7 +169,7 @@ const y = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), z = (e) =
|
|
|
169
169
|
DayButton: k
|
|
170
170
|
},
|
|
171
171
|
disabled: (a) => a < w,
|
|
172
|
-
|
|
172
|
+
autoFocus: !0,
|
|
173
173
|
"data-testid": "start-date-calendar"
|
|
174
174
|
}
|
|
175
175
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as E, Fragment as B, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as O, useEffect as S } from "react";
|
|
3
3
|
import { cn as T, HourPickerField as R } from "@rpcbase/ui";
|
|
4
|
-
import { useMorphingModalWizardOverlayLayer as w } from "../../../chunks/ui/dist/MorphingModalWizard-
|
|
4
|
+
import { useMorphingModalWizardOverlayLayer as w } from "../../../chunks/ui/dist/MorphingModalWizard-V0zTc513.js";
|
|
5
5
|
import { Label as P } from "../../../ui/label.js";
|
|
6
6
|
import { useBookingPeriod as H } from "../BookingPeriodContext.js";
|
|
7
7
|
import { BookingPeriodFieldErrorMessage as U } from "./BookingPeriodFieldErrorMessage.js";
|