@loczer/storefront-sdk 0.175.0 → 0.176.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/ui/day-picker.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronLeft as s, ChevronRight as
|
|
3
|
-
import { DayPicker as
|
|
2
|
+
import { ChevronLeft as s, ChevronRight as c } from "lucide-react";
|
|
3
|
+
import { DayPicker as m } from "react-day-picker";
|
|
4
4
|
import { cn as e } from "@rpcbase/ui";
|
|
5
|
-
import { buttonVariants as
|
|
6
|
-
const l =
|
|
7
|
-
function
|
|
5
|
+
import { buttonVariants as o } from "./button.js";
|
|
6
|
+
const l = m;
|
|
7
|
+
function y({ className: a, classNames: n, components: d, showOutsideDays: i = !0, ...u }) {
|
|
8
8
|
return /* @__PURE__ */ r(
|
|
9
9
|
l,
|
|
10
10
|
{
|
|
11
11
|
weekStartsOn: 1,
|
|
12
|
-
showOutsideDays:
|
|
13
|
-
className: e("p-3",
|
|
12
|
+
showOutsideDays: i,
|
|
13
|
+
className: e("p-3", a),
|
|
14
14
|
classNames: {
|
|
15
15
|
month: "space-y-4",
|
|
16
16
|
months: "flex flex-col sm:flex-row space-y-4 sm:space-y-0 relative gap-2",
|
|
@@ -18,19 +18,19 @@ function p({ className: o, classNames: n, components: i, showOutsideDays: d = !0
|
|
|
18
18
|
month_grid: "w-full border-collapse space-y-1",
|
|
19
19
|
caption_label: "text-sm font-medium",
|
|
20
20
|
nav: "flex items-center justify-between absolute inset-x-0",
|
|
21
|
-
button_previous: e(
|
|
22
|
-
button_next: e(
|
|
21
|
+
button_previous: e(o({ variant: "outline" }), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 z-10"),
|
|
22
|
+
button_next: e(o({ variant: "outline" }), "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100 z-10"),
|
|
23
23
|
weeks: "w-full border-collapse",
|
|
24
24
|
weekdays: "flex",
|
|
25
25
|
weekday: "text-muted-foreground rounded-md w-9 font-normal text-xs",
|
|
26
26
|
week: "flex w-full mt-2",
|
|
27
27
|
day: "h-9 w-9 p-0 font-normal aria-selected:opacity-100 rounded-md first:aria-selected:rounded-l-md last:aria-selected:rounded-r-md",
|
|
28
28
|
day_button: e(
|
|
29
|
-
|
|
29
|
+
o({ variant: "ghost" }),
|
|
30
30
|
"h-9 w-9 text-center text-sm p-0 relative focus-within:relative focus-within:z-20"
|
|
31
31
|
),
|
|
32
|
-
range_start: "day-range-start !bg-accent rounded-l-md [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
|
|
33
|
-
range_end: "day-range-end !bg-accent rounded-r-md [&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
|
|
32
|
+
range_start: "day-range-start !bg-accent rounded-l-md [&:not(.day-range-end)]:!rounded-r-none [&>button]:bg-primary [&>button]:text-primary-foreground [&:not(.day-range-end)>button]:!rounded-r-none [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
|
|
33
|
+
range_end: "day-range-end !bg-accent rounded-r-md [&:not(.day-range-start)]:!rounded-l-none [&>button]:bg-primary [&>button]:text-primary-foreground [&:not(.day-range-start)>button]:!rounded-l-none [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
|
|
34
34
|
range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground !rounded-none",
|
|
35
35
|
selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
36
36
|
today: "bg-gray-50 text-accent-foreground !rounded-md",
|
|
@@ -40,14 +40,14 @@ function p({ className: o, classNames: n, components: i, showOutsideDays: d = !0
|
|
|
40
40
|
...n
|
|
41
41
|
},
|
|
42
42
|
components: {
|
|
43
|
-
Chevron: ({ ...t }) => t.orientation === "left" ? /* @__PURE__ */ r(s, { ...t, className: "h-4 w-4" }) : /* @__PURE__ */ r(
|
|
44
|
-
...
|
|
43
|
+
Chevron: ({ ...t }) => t.orientation === "left" ? /* @__PURE__ */ r(s, { ...t, className: "h-4 w-4" }) : /* @__PURE__ */ r(c, { ...t, className: "h-4 w-4" }),
|
|
44
|
+
...d
|
|
45
45
|
},
|
|
46
|
-
...
|
|
46
|
+
...u
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
y.displayName = "DayPicker";
|
|
51
51
|
export {
|
|
52
|
-
|
|
52
|
+
y as DayPicker
|
|
53
53
|
};
|