trepur_components 2.3.26 → 2.3.27
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/lib/components/Accordion/index.js +5 -5
- package/lib/components/AlertBar/index.js +31 -27
- package/lib/components/Button/index.js +2 -3
- package/lib/components/Calendar/index.js +27 -27
- package/lib/components/Card/index.js +7 -7
- package/lib/components/Carousel/Carousel.stories.d.ts +1 -3
- package/lib/components/Carousel/index.d.ts +15 -17
- package/lib/components/Carousel/index.js +100 -100
- package/lib/components/CarouselThumbnail/index.d.ts +14 -14
- package/lib/components/Collapsible/index.js +44 -41
- package/lib/components/DetailUpdater/DetailUpdater.stories.d.ts +1 -3
- package/lib/components/DetailUpdater/index.d.ts +1 -4
- package/lib/components/DetailUpdater/index.js +11 -13
- package/lib/components/Dialog/Dialog.stories.d.ts +1 -1
- package/lib/components/Dialog/index.d.ts +2 -2
- package/lib/components/Dialog/index.js +4 -14
- package/lib/components/Dropdown/index.js +41 -41
- package/lib/components/FileUploader/FilePreview.d.ts +1 -1
- package/lib/components/FooterNav/index.js +24 -16
- package/lib/components/Form/Form.stories.d.ts +3 -22
- package/lib/components/Input/index.js +36 -36
- package/lib/components/MenuButton/MenuButton.stories.d.ts +1 -17
- package/lib/components/MenuButton/index.d.ts +1 -3
- package/lib/components/MenuButton/index.js +9 -15
- package/lib/components/Modal/Modal.stories.d.ts +1 -1
- package/lib/components/Modal/index.d.ts +1 -1
- package/lib/components/NavItem/index.js +21 -14
- package/lib/components/Search/Search.stories.d.ts +1 -11
- package/lib/components/Search/index.d.ts +1 -1
- package/lib/components/Select/Select.stories.d.ts +1 -1
- package/lib/components/Select/index.d.ts +1 -1
- package/lib/components/Showcase/Showcase.stories.d.ts +3 -7
- package/lib/components/Showcase/index.d.ts +1 -1
- package/lib/components/SideNav/SideNav.stories.d.ts +4 -12
- package/lib/components/SideNav/index.d.ts +2 -2
- package/lib/components/SocialButton/SocialButton.stories.d.ts +10 -25
- package/lib/components/SocialButton/index.d.ts +1 -1
- package/lib/components/SplitCard/index.js +34 -34
- package/lib/components/Stars/index.d.ts +0 -3
- package/lib/components/Stars/index.js +6 -6
- package/lib/components/Testimonial/index.js +31 -15
- package/lib/components/TextArea/index.js +37 -37
- package/lib/components/index.d.ts +1 -1
- package/lib/styles/themes/penrithmrt.css +12 -12
- package/lib/tailwind/boxShadow.ts +1 -1
- package/lib/tailwind/colors.ts +20 -20
- package/lib/tailwind/container.ts +2 -2
- package/lib/tailwind/preset.ts +12 -12
- package/lib/tailwind/spacing.ts +1 -1
- package/package.json +4 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
const o =
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import a from "clsx";
|
|
4
|
+
const o = t(({ id: r, className: c, children: i, ...m }, s) => /* @__PURE__ */ n("div", { id: r, className: a("", c), ref: s, ...m, children: i }));
|
|
5
5
|
o.displayName = "Accordion";
|
|
6
|
-
const
|
|
6
|
+
const f = Object.assign(o);
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
f as Accordion
|
|
9
9
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as b, forwardRef as
|
|
2
|
+
import { createContext as b, forwardRef as o, useMemo as h, useContext as l } from "react";
|
|
3
3
|
import { faCrosshairs as A } from "@fortawesome/fontawesome-free-solid";
|
|
4
4
|
import B from "clsx";
|
|
5
|
-
import { Button as
|
|
5
|
+
import { Button as w } from "../Button/index.js";
|
|
6
6
|
import { Icon as c } from "../Icon/index.js";
|
|
7
|
-
const
|
|
7
|
+
const s = b(null), f = o(
|
|
8
8
|
({
|
|
9
|
-
className:
|
|
10
|
-
children:
|
|
9
|
+
className: t,
|
|
10
|
+
children: a,
|
|
11
11
|
variant: e = "info",
|
|
12
12
|
dismiss: n = !1,
|
|
13
13
|
loading: i = !1,
|
|
@@ -20,46 +20,50 @@ const o = b(null), f = s(
|
|
|
20
20
|
}),
|
|
21
21
|
[n, i]
|
|
22
22
|
);
|
|
23
|
-
return /* @__PURE__ */ r(
|
|
23
|
+
return /* @__PURE__ */ r(s.Provider, { value: x, children: /* @__PURE__ */ r(
|
|
24
24
|
"div",
|
|
25
25
|
{
|
|
26
|
-
className: B(
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
className: B(
|
|
27
|
+
"flex w-full items-center gap-x-2 px-8 py-2",
|
|
28
|
+
t,
|
|
29
|
+
{
|
|
30
|
+
"border-error-default bg-error-light text-error-default": e === "error",
|
|
31
|
+
"border-info-default bg-info-light text-info-default": e === "info",
|
|
32
|
+
"border-success-default bg-success-light text-success-default": e === "success",
|
|
33
|
+
"border-warning-default bg-warning-light text-warning-default": e === "warning"
|
|
34
|
+
}
|
|
35
|
+
),
|
|
32
36
|
ref: p,
|
|
33
37
|
...g,
|
|
34
|
-
children:
|
|
38
|
+
children: a
|
|
35
39
|
}
|
|
36
40
|
) });
|
|
37
41
|
}
|
|
38
|
-
), d =
|
|
39
|
-
const { loading: e } = l(
|
|
42
|
+
), d = o(({ ...t }, a) => {
|
|
43
|
+
const { loading: e } = l(s) || {};
|
|
40
44
|
return e ? /* @__PURE__ */ r("p", { className: "bg-loading h-6 w-40 animate-pulse rounded-lg" }) : /* @__PURE__ */ r(
|
|
41
45
|
"p",
|
|
42
46
|
{
|
|
43
47
|
className: "text-md text-light-grey flex-1 truncate",
|
|
44
|
-
ref:
|
|
45
|
-
...
|
|
48
|
+
ref: a,
|
|
49
|
+
...t
|
|
46
50
|
}
|
|
47
51
|
);
|
|
48
|
-
}),
|
|
49
|
-
const { loading: e } = l(
|
|
50
|
-
return e ? /* @__PURE__ */ r("span", { className: "bg-loading h-6 w-6 animate-pulse rounded-lg" }) : /* @__PURE__ */ r(c, { ref:
|
|
51
|
-
}),
|
|
52
|
-
const { loading:
|
|
53
|
-
return /* @__PURE__ */ r(
|
|
52
|
+
}), u = o(({ icon: t }, a) => {
|
|
53
|
+
const { loading: e } = l(s) || {};
|
|
54
|
+
return e ? /* @__PURE__ */ r("span", { className: "bg-loading h-6 w-6 animate-pulse rounded-lg" }) : /* @__PURE__ */ r(c, { ref: a, icon: t });
|
|
55
|
+
}), m = o(({ ...t }) => {
|
|
56
|
+
const { loading: a = !1 } = l(s) || {};
|
|
57
|
+
return /* @__PURE__ */ r(w, { loading: a, variant: "ghost", ...t, children: /* @__PURE__ */ r(c, { icon: A }) });
|
|
54
58
|
});
|
|
55
59
|
f.displayName = "AlertBar";
|
|
56
60
|
d.displayName = "AlertBar.Label";
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
u.displayName = "AlertBar.Icon";
|
|
62
|
+
m.displayName = "AlertBar.Dismiss";
|
|
59
63
|
const j = Object.assign(f, {
|
|
60
64
|
Label: d,
|
|
61
|
-
Icon:
|
|
62
|
-
Dismiss:
|
|
65
|
+
Icon: u,
|
|
66
|
+
Dismiss: m
|
|
63
67
|
});
|
|
64
68
|
export {
|
|
65
69
|
j as AlertBar
|
|
@@ -9,7 +9,6 @@ const l = n(({ children: o, ...e }) => /* @__PURE__ */ r("button", { type: "butt
|
|
|
9
9
|
loading: t = !1,
|
|
10
10
|
variant: b = "primary",
|
|
11
11
|
type: i = "button",
|
|
12
|
-
disabled: h,
|
|
13
12
|
href: m,
|
|
14
13
|
target: p,
|
|
15
14
|
size: a = "md"
|
|
@@ -42,10 +41,10 @@ const l = n(({ children: o, ...e }) => /* @__PURE__ */ r("button", { type: "butt
|
|
|
42
41
|
c.displayName = "Button";
|
|
43
42
|
d.displayName = "Button.Icon";
|
|
44
43
|
u.displayName = "Button.Label";
|
|
45
|
-
const
|
|
44
|
+
const N = Object.assign(c, {
|
|
46
45
|
Icon: d,
|
|
47
46
|
Label: u
|
|
48
47
|
});
|
|
49
48
|
export {
|
|
50
|
-
|
|
49
|
+
N as Button
|
|
51
50
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g, useState as w } from "react";
|
|
3
|
+
import y from "react-calendar";
|
|
4
4
|
import "./style.css.js";
|
|
5
|
-
const
|
|
5
|
+
const o = g(
|
|
6
6
|
({
|
|
7
|
-
onChange:
|
|
8
|
-
useRange:
|
|
7
|
+
onChange: i,
|
|
8
|
+
useRange: m,
|
|
9
9
|
minDetail: s,
|
|
10
|
-
minDate:
|
|
11
|
-
maxDate:
|
|
12
|
-
showNavigation:
|
|
13
|
-
disabledDates:
|
|
10
|
+
minDate: l,
|
|
11
|
+
maxDate: c,
|
|
12
|
+
showNavigation: f,
|
|
13
|
+
disabledDates: d,
|
|
14
14
|
showDoubleView: p
|
|
15
|
-
},
|
|
16
|
-
const [n, r] =
|
|
15
|
+
}, u) => {
|
|
16
|
+
const [n, r] = w(/* @__PURE__ */ new Date()), D = (e, t) => {
|
|
17
17
|
const a = new Intl.DateTimeFormat("en-gb", {
|
|
18
18
|
year: "numeric",
|
|
19
19
|
month: "2-digit",
|
|
@@ -21,29 +21,29 @@ const i = w(
|
|
|
21
21
|
}).format(e == null ? void 0 : e.date);
|
|
22
22
|
return t ? t.includes(a) : !1;
|
|
23
23
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
24
|
+
return /* @__PURE__ */ C(
|
|
25
|
+
y,
|
|
26
26
|
{
|
|
27
|
-
ref:
|
|
28
|
-
onActiveStartDateChange: ({
|
|
29
|
-
const
|
|
30
|
-
|
|
27
|
+
ref: u,
|
|
28
|
+
onActiveStartDateChange: ({ activeStartDate: e, action: t }) => {
|
|
29
|
+
const a = e !== null ? e : n;
|
|
30
|
+
t === "next" && r(new Date(a)), t === "prev" && r(new Date(a));
|
|
31
31
|
},
|
|
32
32
|
activeStartDate: n,
|
|
33
|
-
onChange:
|
|
34
|
-
selectRange:
|
|
33
|
+
onChange: i,
|
|
34
|
+
selectRange: m,
|
|
35
35
|
minDetail: s,
|
|
36
|
-
minDate:
|
|
37
|
-
maxDate:
|
|
38
|
-
showNavigation:
|
|
36
|
+
minDate: l,
|
|
37
|
+
maxDate: c,
|
|
38
|
+
showNavigation: f,
|
|
39
39
|
showDoubleView: p,
|
|
40
|
-
tileDisabled: (e) =>
|
|
40
|
+
tileDisabled: (e) => D(e, d)
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
|
-
|
|
46
|
-
const
|
|
45
|
+
o.displayName = "Calendar";
|
|
46
|
+
const v = Object.assign(o);
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
v as CalendarComponent
|
|
49
49
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as l } from "react";
|
|
3
3
|
import m from "clsx";
|
|
4
|
-
const
|
|
5
|
-
let a = "div",
|
|
6
|
-
return (o || r) && (a = "a",
|
|
4
|
+
const e = l(({ className: s, href: o, target: r, children: d, ...i }) => {
|
|
5
|
+
let a = "div", t = {};
|
|
6
|
+
return (o || r) && (a = "a", t = { href: o, target: r, ...i }), /* @__PURE__ */ n(
|
|
7
7
|
a,
|
|
8
8
|
{
|
|
9
9
|
className: m(
|
|
@@ -13,13 +13,13 @@ const t = l(({ className: s, href: o, target: r, children: d, ...i }, p) => {
|
|
|
13
13
|
},
|
|
14
14
|
s
|
|
15
15
|
),
|
|
16
|
-
...
|
|
16
|
+
...t,
|
|
17
17
|
children: d
|
|
18
18
|
}
|
|
19
19
|
);
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
const
|
|
21
|
+
e.displayName = "Card";
|
|
22
|
+
const g = Object.assign(e);
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
g as Card
|
|
25
25
|
};
|
|
@@ -7,9 +7,7 @@ declare const meta: {
|
|
|
7
7
|
Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
8
|
Arrow: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('.').ArrowProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
9
|
Dots: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLButtonElement> & import('.').DotProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
|
-
Slides: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> &
|
|
11
|
-
rightArrow?: boolean | undefined;
|
|
12
|
-
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Slides: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
11
|
};
|
|
14
12
|
args: {
|
|
15
13
|
perView: number;
|
|
@@ -17,7 +17,7 @@ export interface CarouselContextProps {
|
|
|
17
17
|
instanceRef?: any;
|
|
18
18
|
currentSlide?: number;
|
|
19
19
|
slideWrapperClassName?: string;
|
|
20
|
-
breakpoints?: Record<string, Omit<KeenSliderOptions<
|
|
20
|
+
breakpoints?: Record<string, Omit<KeenSliderOptions<object, object, KeenSliderHooks>, 'breakpoints'>>;
|
|
21
21
|
defaultAnimation?: {
|
|
22
22
|
duration?: number;
|
|
23
23
|
easing?: (t: number) => number;
|
|
@@ -38,20 +38,20 @@ export interface CarouselContextProps {
|
|
|
38
38
|
rubberband?: boolean;
|
|
39
39
|
slides?: any[];
|
|
40
40
|
vertical?: boolean;
|
|
41
|
-
animationStarted?: (slider: KeenSliderInstance<
|
|
42
|
-
animationStopped?: (slider: KeenSliderInstance<
|
|
43
|
-
animationEnded?: (slider: KeenSliderInstance<
|
|
44
|
-
created?: (slider: KeenSliderInstance<
|
|
45
|
-
destroyed?: (slider: KeenSliderInstance<
|
|
46
|
-
detailsChanged?: (slider: KeenSliderInstance<
|
|
47
|
-
dragged?: (slider: KeenSliderInstance<
|
|
48
|
-
dragStarted?: (slider: KeenSliderInstance<
|
|
49
|
-
dragChecked?: (slider: KeenSliderInstance<
|
|
50
|
-
dragEnded?: (slider: KeenSliderInstance<
|
|
51
|
-
beforeOptionsChanged?: (slider: KeenSliderInstance<
|
|
52
|
-
optionsChanged?: (slider: KeenSliderInstance<
|
|
41
|
+
animationStarted?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
42
|
+
animationStopped?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
43
|
+
animationEnded?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
44
|
+
created?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
45
|
+
destroyed?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
46
|
+
detailsChanged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
47
|
+
dragged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
48
|
+
dragStarted?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
49
|
+
dragChecked?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
50
|
+
dragEnded?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
51
|
+
beforeOptionsChanged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
52
|
+
optionsChanged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
53
53
|
slideChanged?: boolean;
|
|
54
|
-
updated?: (slider: KeenSliderInstance<
|
|
54
|
+
updated?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
55
55
|
perView?: number;
|
|
56
56
|
spacing?: number;
|
|
57
57
|
number?: number;
|
|
@@ -63,8 +63,6 @@ declare const Carousel: import('react').ForwardRefExoticComponent<HTMLAttributes
|
|
|
63
63
|
Content: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
64
64
|
Arrow: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & ArrowProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
65
65
|
Dots: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLButtonElement> & DotProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
66
|
-
Slides: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> &
|
|
67
|
-
rightArrow?: boolean | undefined;
|
|
68
|
-
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
66
|
+
Slides: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
69
67
|
};
|
|
70
68
|
export { Carousel };
|
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { faChevronRight as
|
|
5
|
-
import
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as I, forwardRef as h, useState as k, useMemo as K, useContext as b } from "react";
|
|
3
|
+
import { Icon as j } from "../Icon/index.js";
|
|
4
|
+
import { faChevronRight as L, faChevronLeft as O, faCircle as T } from "@fortawesome/fontawesome-free-solid";
|
|
5
|
+
import m from "clsx";
|
|
6
6
|
import "../../node_modules/keen-slider/keen-slider.min.css.js";
|
|
7
|
-
import { useKeenSlider as
|
|
8
|
-
import { WheelControls as
|
|
9
|
-
const
|
|
7
|
+
import { useKeenSlider as $ } from "../../node_modules/keen-slider/react.js";
|
|
8
|
+
import { WheelControls as M } from "./utils.js";
|
|
9
|
+
const g = I(null), A = h(
|
|
10
10
|
({
|
|
11
|
-
breakpoints:
|
|
12
|
-
children:
|
|
13
|
-
className:
|
|
14
|
-
loop:
|
|
15
|
-
perView:
|
|
11
|
+
breakpoints: s,
|
|
12
|
+
children: t,
|
|
13
|
+
className: a,
|
|
14
|
+
loop: e,
|
|
15
|
+
perView: l,
|
|
16
16
|
rubberband: r,
|
|
17
|
-
spacing:
|
|
18
|
-
...
|
|
19
|
-
},
|
|
20
|
-
const [
|
|
17
|
+
spacing: n,
|
|
18
|
+
...i
|
|
19
|
+
}, x) => {
|
|
20
|
+
const [f, u] = k(1), [y, c] = k(!1), [C, p] = $(
|
|
21
21
|
{
|
|
22
|
-
breakpoints:
|
|
23
|
-
loop:
|
|
22
|
+
breakpoints: s,
|
|
23
|
+
loop: e,
|
|
24
24
|
rubberband: r,
|
|
25
|
-
slideChanged(
|
|
26
|
-
d
|
|
25
|
+
slideChanged(d) {
|
|
26
|
+
u(d.track.details.rel);
|
|
27
27
|
},
|
|
28
28
|
created() {
|
|
29
|
-
|
|
29
|
+
c(!0);
|
|
30
30
|
},
|
|
31
31
|
slides: {
|
|
32
|
-
spacing:
|
|
33
|
-
perView:
|
|
32
|
+
spacing: n,
|
|
33
|
+
perView: l
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
[
|
|
37
|
-
), w =
|
|
36
|
+
[M]
|
|
37
|
+
), w = K(
|
|
38
38
|
() => ({
|
|
39
|
-
sliderRef:
|
|
40
|
-
instanceRef:
|
|
41
|
-
currentSlide:
|
|
42
|
-
setCurrentSlide:
|
|
43
|
-
perView:
|
|
44
|
-
...
|
|
39
|
+
sliderRef: C,
|
|
40
|
+
instanceRef: p,
|
|
41
|
+
currentSlide: f,
|
|
42
|
+
setCurrentSlide: u,
|
|
43
|
+
perView: l,
|
|
44
|
+
...i
|
|
45
45
|
}),
|
|
46
46
|
[
|
|
47
|
-
|
|
47
|
+
i,
|
|
48
|
+
C,
|
|
49
|
+
p.current,
|
|
48
50
|
f,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
a,
|
|
53
|
-
x
|
|
51
|
+
u,
|
|
52
|
+
l,
|
|
53
|
+
y
|
|
54
54
|
]
|
|
55
|
-
),
|
|
56
|
-
var
|
|
57
|
-
|
|
55
|
+
), N = (d) => {
|
|
56
|
+
var v;
|
|
57
|
+
d.key === "Tab" && ((v = p.current) == null || v.next());
|
|
58
58
|
};
|
|
59
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ o(g.Provider, { value: w, children: /* @__PURE__ */ o(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
|
-
onKeyDown:
|
|
63
|
-
className:
|
|
64
|
-
ref:
|
|
65
|
-
...
|
|
66
|
-
children:
|
|
62
|
+
onKeyDown: N,
|
|
63
|
+
className: m("navigation-wrapper w-full", a),
|
|
64
|
+
ref: x,
|
|
65
|
+
...i,
|
|
66
|
+
children: t
|
|
67
67
|
}
|
|
68
68
|
) });
|
|
69
69
|
}
|
|
70
|
-
),
|
|
70
|
+
), D = h(({ children: s, className: t, ...a }, e) => /* @__PURE__ */ o(
|
|
71
71
|
"div",
|
|
72
72
|
{
|
|
73
|
-
ref:
|
|
74
|
-
className:
|
|
73
|
+
ref: e,
|
|
74
|
+
className: m(
|
|
75
75
|
"navigation-wrapper flex w-full justify-between gap-4",
|
|
76
|
-
|
|
76
|
+
t
|
|
77
77
|
),
|
|
78
|
-
...
|
|
79
|
-
children:
|
|
78
|
+
...a,
|
|
79
|
+
children: s
|
|
80
80
|
}
|
|
81
|
-
)),
|
|
82
|
-
const { sliderRef:
|
|
83
|
-
return /* @__PURE__ */
|
|
81
|
+
)), P = h(({ className: s, children: t, ...a }) => {
|
|
82
|
+
const { sliderRef: e } = b(g) || {};
|
|
83
|
+
return /* @__PURE__ */ o(
|
|
84
84
|
"div",
|
|
85
85
|
{
|
|
86
|
-
ref:
|
|
87
|
-
className:
|
|
88
|
-
...
|
|
89
|
-
children:
|
|
86
|
+
ref: e,
|
|
87
|
+
className: m("keen-slider w-full pb-4", s),
|
|
88
|
+
...a,
|
|
89
|
+
children: t
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
|
-
}),
|
|
93
|
-
const { instanceRef:
|
|
94
|
-
return /* @__PURE__ */
|
|
92
|
+
}), R = h(({ className: s, rightArrow: t = !1, ...a }, e) => {
|
|
93
|
+
const { instanceRef: l } = b(g) || {};
|
|
94
|
+
return /* @__PURE__ */ o(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
97
|
-
ref:
|
|
98
|
-
className:
|
|
97
|
+
ref: e,
|
|
98
|
+
className: m(
|
|
99
99
|
"my-auto text-carousel-arrow-default hover:cursor-pointer hover:text-carousel-arrow-hover",
|
|
100
|
-
|
|
100
|
+
s
|
|
101
101
|
),
|
|
102
|
-
onClick: (
|
|
103
|
-
var
|
|
104
|
-
|
|
102
|
+
onClick: (r) => {
|
|
103
|
+
var n, i;
|
|
104
|
+
t ? r.stopPropagation() !== void 0 || ((n = l.current) == null || n.next()) : r.stopPropagation() !== void 0 || ((i = l.current) == null || i.prev());
|
|
105
105
|
},
|
|
106
|
-
...
|
|
107
|
-
children: /* @__PURE__ */
|
|
106
|
+
...a,
|
|
107
|
+
children: /* @__PURE__ */ o("a", { children: /* @__PURE__ */ o(j, { icon: t ? L : O, size: "3x" }) })
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
|
-
}),
|
|
111
|
-
var
|
|
110
|
+
}), z = h(({ className: s, ...t }, a) => {
|
|
111
|
+
var x, f, u, y;
|
|
112
112
|
const {
|
|
113
|
-
instanceRef:
|
|
114
|
-
loop:
|
|
115
|
-
currentSlide:
|
|
116
|
-
perView:
|
|
117
|
-
} = b(
|
|
118
|
-
return /* @__PURE__ */
|
|
119
|
-
var
|
|
120
|
-
const
|
|
121
|
-
return /* @__PURE__ */
|
|
113
|
+
instanceRef: e,
|
|
114
|
+
loop: l,
|
|
115
|
+
currentSlide: r = 1,
|
|
116
|
+
perView: n = 1
|
|
117
|
+
} = b(g) || {}, i = (y = (u = (f = (x = e == null ? void 0 : e.current) == null ? void 0 : x.track) == null ? void 0 : f.details) == null ? void 0 : u.slides) == null ? void 0 : y.length;
|
|
118
|
+
return /* @__PURE__ */ o("div", { className: m("flex justify-center", s), children: [...Array(i).keys()].map((c) => {
|
|
119
|
+
var w, N, d, v;
|
|
120
|
+
const C = ((v = (d = (N = (w = e == null ? void 0 : e.current) == null ? void 0 : w.track) == null ? void 0 : N.details) == null ? void 0 : d.slides) == null ? void 0 : v.length) ?? 1, p = l ? r + n <= C ? c >= r && c < r + n : c >= r || r + n - C - 1 >= c : r === c;
|
|
121
|
+
return /* @__PURE__ */ o(
|
|
122
122
|
"button",
|
|
123
123
|
{
|
|
124
124
|
ref: a,
|
|
125
125
|
type: "button",
|
|
126
126
|
onClick: () => {
|
|
127
|
-
var
|
|
128
|
-
(
|
|
127
|
+
var S;
|
|
128
|
+
(S = e.current) == null || S.moveToIdx(c);
|
|
129
129
|
},
|
|
130
130
|
"aria-label": `carousel-button${t.id ? `-${t.id}` : ""}`,
|
|
131
|
-
children: /* @__PURE__ */
|
|
132
|
-
|
|
131
|
+
children: /* @__PURE__ */ o(
|
|
132
|
+
j,
|
|
133
133
|
{
|
|
134
|
-
className:
|
|
134
|
+
className: m(
|
|
135
135
|
"hover:text-carousel-dots-hover",
|
|
136
|
-
|
|
136
|
+
p ? "text-carousel-dots-active" : "text-carousel-dots-default"
|
|
137
137
|
),
|
|
138
|
-
icon:
|
|
138
|
+
icon: T,
|
|
139
139
|
size: "2x"
|
|
140
140
|
}
|
|
141
141
|
)
|
|
@@ -143,17 +143,17 @@ const N = L(null), P = p(
|
|
|
143
143
|
);
|
|
144
144
|
}) });
|
|
145
145
|
});
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
Content:
|
|
153
|
-
Arrow:
|
|
154
|
-
Dots:
|
|
155
|
-
Slides:
|
|
146
|
+
A.displayName = "Carousel";
|
|
147
|
+
D.displayName = "Carousel.Content";
|
|
148
|
+
R.displayName = "Carousel.Arrow";
|
|
149
|
+
z.displayName = "Carousel.Dots";
|
|
150
|
+
P.displayName = "Carousel.Slides";
|
|
151
|
+
const Q = Object.assign(A, {
|
|
152
|
+
Content: D,
|
|
153
|
+
Arrow: R,
|
|
154
|
+
Dots: z,
|
|
155
|
+
Slides: P
|
|
156
156
|
});
|
|
157
157
|
export {
|
|
158
|
-
|
|
158
|
+
Q as Carousel
|
|
159
159
|
};
|
|
@@ -3,7 +3,7 @@ import { HTMLAttributes } from 'react';
|
|
|
3
3
|
|
|
4
4
|
export interface CarouselThumbnailContextProps {
|
|
5
5
|
slideWrapperClassName?: string;
|
|
6
|
-
breakpoints?: Record<string, Omit<KeenSliderOptions<
|
|
6
|
+
breakpoints?: Record<string, Omit<KeenSliderOptions<object, object, KeenSliderHooks>, 'breakpoints'>>;
|
|
7
7
|
defaultAnimation?: {
|
|
8
8
|
duration?: number;
|
|
9
9
|
easing?: (t: number) => number;
|
|
@@ -24,20 +24,20 @@ export interface CarouselThumbnailContextProps {
|
|
|
24
24
|
rubberband?: boolean;
|
|
25
25
|
slides?: any[];
|
|
26
26
|
vertical?: boolean;
|
|
27
|
-
animationStarted?: (slider: KeenSliderInstance<
|
|
28
|
-
animationStopped?: (slider: KeenSliderInstance<
|
|
29
|
-
animationEnded?: (slider: KeenSliderInstance<
|
|
30
|
-
created?: (slider: KeenSliderInstance<
|
|
31
|
-
destroyed?: (slider: KeenSliderInstance<
|
|
32
|
-
detailsChanged?: (slider: KeenSliderInstance<
|
|
33
|
-
dragged?: (slider: KeenSliderInstance<
|
|
34
|
-
dragStarted?: (slider: KeenSliderInstance<
|
|
35
|
-
dragChecked?: (slider: KeenSliderInstance<
|
|
36
|
-
dragEnded?: (slider: KeenSliderInstance<
|
|
37
|
-
beforeOptionsChanged?: (slider: KeenSliderInstance<
|
|
38
|
-
optionsChanged?: (slider: KeenSliderInstance<
|
|
27
|
+
animationStarted?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
28
|
+
animationStopped?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
29
|
+
animationEnded?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
30
|
+
created?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
31
|
+
destroyed?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
32
|
+
detailsChanged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
33
|
+
dragged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
34
|
+
dragStarted?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
35
|
+
dragChecked?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
36
|
+
dragEnded?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
37
|
+
beforeOptionsChanged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
38
|
+
optionsChanged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
39
39
|
slideChanged?: boolean;
|
|
40
|
-
updated?: (slider: KeenSliderInstance<
|
|
40
|
+
updated?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
41
41
|
spacing?: number;
|
|
42
42
|
number?: number;
|
|
43
43
|
origin?: number | 'auto' | 'center';
|