@phillips/seldon 1.69.0 → 1.71.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/components/Carousel/Carousel.d.ts +4 -0
- package/dist/components/Carousel/Carousel.js +63 -45
- package/dist/components/Carousel/CarouselDots.js +35 -35
- package/dist/components/Carousel/CarouselItem.js +7 -6
- package/dist/components/Modal/Modal.d.ts +9 -1
- package/dist/components/Modal/Modal.js +21 -18
- package/dist/components/PinchZoom/PinchZoom.d.ts +30 -0
- package/dist/components/PinchZoom/PinchZoom.js +48 -0
- package/dist/components/PinchZoom/index.d.ts +1 -0
- package/dist/components/Search/Search.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +33 -31
- package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +902 -0
- package/dist/scss/_utils.scss +4 -0
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Carousel/_carousel.scss +4 -0
- package/dist/scss/components/PinchZoom/_pinchZoom.scss +38 -0
- package/package.json +2 -1
|
@@ -23,6 +23,10 @@ export interface CarouselProps extends ComponentProps<'div'> {
|
|
|
23
23
|
* Whether the carousel should use wheel gestures.
|
|
24
24
|
*/
|
|
25
25
|
useWheelGestures?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the carousel should disable dragging.
|
|
28
|
+
*/
|
|
29
|
+
disableDrag?: boolean;
|
|
26
30
|
}
|
|
27
31
|
type CarouselContextProps = {
|
|
28
32
|
carouselRef: ReturnType<typeof useEmblaCarousel>[0];
|
|
@@ -1,72 +1,90 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as A, forwardRef as R, useEffect as m, useCallback as n } from "react";
|
|
3
|
+
import { getCommonProps as b } from "../../utils/index.js";
|
|
4
|
+
import d from "../../node_modules/classnames/index.js";
|
|
5
5
|
import E from "../../node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js";
|
|
6
|
-
import { WheelGesturesPlugin as
|
|
7
|
-
const
|
|
8
|
-
({
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { WheelGesturesPlugin as K } from "../../node_modules/embla-carousel-wheel-gestures/dist/embla-carousel-wheel-gestures.esm.js";
|
|
7
|
+
const W = A(null), h = R(
|
|
8
|
+
({
|
|
9
|
+
loop: a = !1,
|
|
10
|
+
startIndex: x = 0,
|
|
11
|
+
onSlideChange: o,
|
|
12
|
+
className: N,
|
|
13
|
+
children: P,
|
|
14
|
+
columnGap: v,
|
|
15
|
+
useWheelGestures: w = !1,
|
|
16
|
+
disableDrag: s = !1,
|
|
17
|
+
...t
|
|
18
|
+
}, y) => {
|
|
19
|
+
var c, f;
|
|
20
|
+
const { className: C, ...D } = b(t, "Carousel"), [I, e] = E(
|
|
11
21
|
{
|
|
12
|
-
loop:
|
|
13
|
-
startIndex:
|
|
22
|
+
loop: a,
|
|
23
|
+
startIndex: x
|
|
14
24
|
},
|
|
15
25
|
[
|
|
16
|
-
...
|
|
17
|
-
|
|
26
|
+
...w ? [
|
|
27
|
+
K({
|
|
18
28
|
forceWheelAxis: "x"
|
|
19
29
|
})
|
|
20
30
|
] : []
|
|
21
31
|
]
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
);
|
|
33
|
+
m(() => {
|
|
34
|
+
s ? e == null || e.reInit({
|
|
35
|
+
watchDrag: () => !1
|
|
36
|
+
}) : e == null || e.reInit({
|
|
37
|
+
watchDrag: () => !0
|
|
38
|
+
});
|
|
39
|
+
}, [s, e]);
|
|
40
|
+
const k = n(
|
|
41
|
+
(r) => {
|
|
42
|
+
r.key === "ArrowLeft" ? (r.preventDefault(), e == null || e.scrollPrev()) : r.key === "ArrowRight" && (r.preventDefault(), e == null || e.scrollNext());
|
|
25
43
|
},
|
|
26
|
-
[
|
|
27
|
-
),
|
|
28
|
-
(
|
|
29
|
-
|
|
44
|
+
[e]
|
|
45
|
+
), l = n(
|
|
46
|
+
(r) => {
|
|
47
|
+
r && (o == null || o(r.selectedScrollSnap()));
|
|
30
48
|
},
|
|
31
|
-
[
|
|
49
|
+
[o]
|
|
32
50
|
);
|
|
33
|
-
return
|
|
34
|
-
if (
|
|
35
|
-
return
|
|
36
|
-
|
|
51
|
+
return m(() => {
|
|
52
|
+
if (e)
|
|
53
|
+
return l(e), e.on("reInit", l), e.on("settle", l), () => {
|
|
54
|
+
e == null || e.off("settle", l), e == null || e.off("reInit", l);
|
|
37
55
|
};
|
|
38
|
-
}, [
|
|
39
|
-
|
|
56
|
+
}, [e, l]), /* @__PURE__ */ u(
|
|
57
|
+
W.Provider,
|
|
40
58
|
{
|
|
41
59
|
value: {
|
|
42
|
-
carouselRef:
|
|
43
|
-
api:
|
|
44
|
-
scrollPrev: () =>
|
|
45
|
-
scrollNext: () =>
|
|
46
|
-
canScrollPrev: (
|
|
47
|
-
canScrollNext: (
|
|
48
|
-
columnGap:
|
|
49
|
-
onSlideChange:
|
|
60
|
+
carouselRef: I,
|
|
61
|
+
api: e,
|
|
62
|
+
scrollPrev: () => e == null ? void 0 : e.scrollPrev(),
|
|
63
|
+
scrollNext: () => e == null ? void 0 : e.scrollNext(),
|
|
64
|
+
canScrollPrev: (c = e == null ? void 0 : e.canScrollPrev()) != null ? c : !1,
|
|
65
|
+
canScrollNext: (f = e == null ? void 0 : e.canScrollNext()) != null ? f : !1,
|
|
66
|
+
columnGap: v,
|
|
67
|
+
onSlideChange: o
|
|
50
68
|
},
|
|
51
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ u(
|
|
52
70
|
"div",
|
|
53
71
|
{
|
|
54
|
-
ref:
|
|
55
|
-
onKeyDownCapture:
|
|
56
|
-
className:
|
|
72
|
+
ref: y,
|
|
73
|
+
onKeyDownCapture: k,
|
|
74
|
+
className: d(C, N),
|
|
57
75
|
role: "region",
|
|
58
76
|
"aria-roledescription": "carousel",
|
|
59
|
-
...
|
|
60
|
-
...
|
|
61
|
-
children:
|
|
77
|
+
...t,
|
|
78
|
+
...D,
|
|
79
|
+
children: P
|
|
62
80
|
}
|
|
63
81
|
)
|
|
64
82
|
}
|
|
65
83
|
);
|
|
66
84
|
}
|
|
67
85
|
);
|
|
68
|
-
|
|
86
|
+
h.displayName = "Carousel";
|
|
69
87
|
export {
|
|
70
|
-
|
|
71
|
-
|
|
88
|
+
W as CarouselContext,
|
|
89
|
+
h as default
|
|
72
90
|
};
|
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { useCarousel as
|
|
5
|
-
import { getCommonProps as
|
|
6
|
-
const
|
|
7
|
-
({ className:
|
|
8
|
-
const { className: s, ...C } =
|
|
9
|
-
Array.from({ length:
|
|
10
|
-
), x =
|
|
2
|
+
import d from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { forwardRef as D, useId as P, useState as S, useCallback as f, useEffect as V } from "react";
|
|
4
|
+
import { useCarousel as _ } from "./utils.js";
|
|
5
|
+
import { getCommonProps as j } from "../../utils/index.js";
|
|
6
|
+
const w = D(
|
|
7
|
+
({ className: $, maxDots: l = 7, position: h = "inline", numberOfSlides: N = 0, ...u }, b) => {
|
|
8
|
+
const { className: s, ...C } = j(u, "Carousel"), M = P(), { api: e, onSlideChange: n } = _(), [g, v] = S(0), [i, k] = S(
|
|
9
|
+
Array.from({ length: N }, (t, o) => o)
|
|
10
|
+
), x = f(
|
|
11
11
|
(t) => {
|
|
12
12
|
e && (e.scrollTo(t, !0), n == null || n(t));
|
|
13
13
|
},
|
|
14
14
|
[e, n]
|
|
15
|
-
),
|
|
16
|
-
|
|
17
|
-
}, []),
|
|
18
|
-
|
|
19
|
-
}, []), m =
|
|
15
|
+
), p = f((t) => {
|
|
16
|
+
k(t.scrollSnapList());
|
|
17
|
+
}, []), a = f((t) => {
|
|
18
|
+
v(t.selectedScrollSnap());
|
|
19
|
+
}, []), m = f(
|
|
20
20
|
(t) => {
|
|
21
21
|
n == null || n(t.selectedScrollSnap());
|
|
22
22
|
},
|
|
23
23
|
[n]
|
|
24
24
|
);
|
|
25
|
-
|
|
25
|
+
V(() => {
|
|
26
26
|
if (e)
|
|
27
|
-
return
|
|
28
|
-
e.off("reInit",
|
|
27
|
+
return p(e), a(e), e.on("reInit", p).on("reInit", a).on("select", a).on("settle", m), () => {
|
|
28
|
+
e.off("reInit", p).off("reInit", a).off("select", a).off("settle", m);
|
|
29
29
|
};
|
|
30
|
-
}, [e,
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
33
|
-
const t = Math.floor(
|
|
30
|
+
}, [e, p, a, m]);
|
|
31
|
+
const I = (() => {
|
|
32
|
+
if (i.length <= l) return i;
|
|
33
|
+
const t = Math.floor(l / 2);
|
|
34
34
|
let o = Math.max(0, g - t);
|
|
35
|
-
const
|
|
36
|
-
return
|
|
35
|
+
const r = Math.min(i.length, o + l);
|
|
36
|
+
return r - o < l && (o = Math.max(0, r - l)), i.slice(o, r);
|
|
37
37
|
})();
|
|
38
38
|
return /* @__PURE__ */ c(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
|
-
ref:
|
|
41
|
+
ref: b,
|
|
42
42
|
role: "group",
|
|
43
43
|
"aria-roledescription": "pagination",
|
|
44
44
|
"aria-label": "pagination",
|
|
45
|
-
className:
|
|
46
|
-
...
|
|
45
|
+
className: d(`${s}-pagination`, $, `${s}-pagination-${h}`),
|
|
46
|
+
...u,
|
|
47
47
|
...C,
|
|
48
|
-
children: /* @__PURE__ */ c("div", { className: `${s}-pagination-container`, children: /* @__PURE__ */ c("div", { className: `${s}-pagination-container-inner`, children:
|
|
49
|
-
const
|
|
48
|
+
children: /* @__PURE__ */ c("div", { className: `${s}-pagination-container`, children: /* @__PURE__ */ c("div", { className: `${s}-pagination-container-inner`, children: I.map((t, o) => {
|
|
49
|
+
const r = i.indexOf(I[o]), y = g === r;
|
|
50
50
|
return /* @__PURE__ */ c(
|
|
51
51
|
"button",
|
|
52
52
|
{
|
|
53
53
|
role: "button",
|
|
54
|
-
onClick: () => x(
|
|
55
|
-
className:
|
|
54
|
+
onClick: () => x(r),
|
|
55
|
+
className: d(`${s}-pagination-dot-container`),
|
|
56
56
|
children: /* @__PURE__ */ c(
|
|
57
57
|
"span",
|
|
58
58
|
{
|
|
59
|
-
className:
|
|
60
|
-
[`${s}-pagination-dot-selected`]:
|
|
59
|
+
className: d(`${s}-pagination-dot`, {
|
|
60
|
+
[`${s}-pagination-dot-selected`]: y
|
|
61
61
|
})
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
},
|
|
65
|
-
|
|
65
|
+
`${M}-dot-${o}`
|
|
66
66
|
);
|
|
67
67
|
}) }) })
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
);
|
|
72
|
-
|
|
72
|
+
w.displayName = "CarouselDots";
|
|
73
73
|
export {
|
|
74
|
-
|
|
74
|
+
w as default
|
|
75
75
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
2
|
+
import i from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { forwardRef as l } from "react";
|
|
4
4
|
import { getCommonProps as c } from "../../utils/index.js";
|
|
5
5
|
import { useCarousel as n } from "./utils.js";
|
|
6
|
-
const u =
|
|
7
|
-
const { className: e, ...a } = c(o, "Carousel"), { columnGap:
|
|
6
|
+
const u = l(({ className: m, ...o }, s) => {
|
|
7
|
+
const { className: e, ...a } = c(o, "Carousel"), { columnGap: r } = n();
|
|
8
8
|
return /* @__PURE__ */ t(
|
|
9
9
|
"div",
|
|
10
10
|
{
|
|
11
11
|
ref: s,
|
|
12
12
|
role: o.onClick ? "button" : "group",
|
|
13
13
|
"aria-roledescription": "slide",
|
|
14
|
-
className:
|
|
15
|
-
[`${e}-item--gap-${
|
|
14
|
+
className: i(`${e}-item`, m, {
|
|
15
|
+
[`${e}-item--gap-${r}`]: !!r,
|
|
16
|
+
[`${e}-item--cursor-pointer`]: !!o.onClick
|
|
16
17
|
}),
|
|
17
18
|
...o,
|
|
18
19
|
...a
|
|
@@ -20,6 +20,14 @@ export interface ModalProps extends ReactModal.Props {
|
|
|
20
20
|
* className for the modal
|
|
21
21
|
*/
|
|
22
22
|
className?: string;
|
|
23
|
+
/**
|
|
24
|
+
* className for the modal overlay
|
|
25
|
+
*/
|
|
26
|
+
overlayClassName?: string;
|
|
27
|
+
/**
|
|
28
|
+
* style for the modal
|
|
29
|
+
*/
|
|
30
|
+
style?: ReactModal.Props['style'];
|
|
23
31
|
}
|
|
24
32
|
/**
|
|
25
33
|
* ## Overview
|
|
@@ -27,5 +35,5 @@ export interface ModalProps extends ReactModal.Props {
|
|
|
27
35
|
* A component for displaying a modal.
|
|
28
36
|
*
|
|
29
37
|
*/
|
|
30
|
-
declare const Modal: ({ children, className, isOpen, onClose, appElementSelector, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
38
|
+
declare const Modal: ({ children, className, overlayClassName, isOpen, onClose, appElementSelector, style, ...props }: ModalProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
31
39
|
export default Modal;
|
|
@@ -1,44 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import t from "../../node_modules/classnames/index.js";
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
3
|
+
import { getCommonProps as y, noOp as C } from "../../utils/index.js";
|
|
4
|
+
import v from "../../assets/close.svg.js";
|
|
5
5
|
import l from "../../node_modules/react-modal/lib/index.js";
|
|
6
|
-
import
|
|
7
|
-
import { ButtonVariants as
|
|
8
|
-
const
|
|
6
|
+
import N from "../IconButton/IconButton.js";
|
|
7
|
+
import { ButtonVariants as b } from "../Button/types.js";
|
|
8
|
+
const w = ({
|
|
9
9
|
children: m,
|
|
10
10
|
className: n,
|
|
11
|
+
overlayClassName: d,
|
|
11
12
|
isOpen: o = !1,
|
|
12
|
-
onClose: a =
|
|
13
|
-
appElementSelector:
|
|
13
|
+
onClose: a = C,
|
|
14
|
+
appElementSelector: i = "main",
|
|
15
|
+
style: c,
|
|
14
16
|
...r
|
|
15
17
|
}) => {
|
|
16
18
|
if (!o)
|
|
17
19
|
return null;
|
|
18
|
-
const { className: e, "data-testid":
|
|
19
|
-
return l.setAppElement(
|
|
20
|
+
const { className: e, "data-testid": f, ...p } = y(r, "Modal");
|
|
21
|
+
return l.setAppElement(i), /* @__PURE__ */ u(
|
|
20
22
|
l,
|
|
21
23
|
{
|
|
22
|
-
...
|
|
24
|
+
...p,
|
|
25
|
+
...r,
|
|
23
26
|
isOpen: o,
|
|
24
27
|
onRequestClose: a,
|
|
25
28
|
className: t(e, n),
|
|
26
|
-
overlayClassName: t(`${e}__overlay
|
|
29
|
+
overlayClassName: t(`${e}__overlay`, d),
|
|
27
30
|
ariaHideApp: o,
|
|
28
|
-
testId:
|
|
31
|
+
testId: f,
|
|
32
|
+
style: c,
|
|
29
33
|
onAfterOpen: () => document.body.style.overflow = "hidden",
|
|
30
34
|
onAfterClose: () => document.body.style.overflow = "unset",
|
|
31
|
-
...r,
|
|
32
35
|
children: [
|
|
33
36
|
/* @__PURE__ */ s(
|
|
34
|
-
|
|
37
|
+
N,
|
|
35
38
|
{
|
|
36
39
|
id: "modal-button",
|
|
37
40
|
onClick: a,
|
|
38
41
|
"aria-label": "Close Modal",
|
|
39
42
|
className: t(`${e}__close`),
|
|
40
|
-
variant:
|
|
41
|
-
children: /* @__PURE__ */ s(
|
|
43
|
+
variant: b.secondary,
|
|
44
|
+
children: /* @__PURE__ */ s(v, {})
|
|
42
45
|
}
|
|
43
46
|
),
|
|
44
47
|
m
|
|
@@ -47,5 +50,5 @@ const g = ({
|
|
|
47
50
|
);
|
|
48
51
|
};
|
|
49
52
|
export {
|
|
50
|
-
|
|
53
|
+
w as default
|
|
51
54
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface PinchZoomProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Function to call when the zoom changes.
|
|
5
|
+
*/
|
|
6
|
+
onZoomChange?: (isZoomed: boolean) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Children to render.
|
|
9
|
+
*/
|
|
10
|
+
children: React.ReactElement;
|
|
11
|
+
/**
|
|
12
|
+
* max zoom level
|
|
13
|
+
*/
|
|
14
|
+
maxZoom?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* ## Overview
|
|
18
|
+
*
|
|
19
|
+
* Component that allows for zooming and panning of its children.
|
|
20
|
+
*
|
|
21
|
+
* Wraps a subset of the [react-zoom-pan-pinch](https://github.com/BetterTyped/react-zoom-pan-pinch) package.
|
|
22
|
+
*
|
|
23
|
+
* View [storybook](https://bettertyped.github.io/react-zoom-pan-pinch/?path=/story/docs-introduction--page) for docs and examples
|
|
24
|
+
*
|
|
25
|
+
* [Figma Link](https://www.figma.com/design/hxqgsE26wM7hII0WaUaDfF/RW---TIMED-Lot-Details-(PDP)?node-id=1394-3984&m=dev)
|
|
26
|
+
*
|
|
27
|
+
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-pinchzoom--overview)
|
|
28
|
+
*/
|
|
29
|
+
declare const PinchZoom: FC<PinchZoomProps>;
|
|
30
|
+
export default PinchZoom;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N, useCallback as b, isValidElement as n, cloneElement as S } from "react";
|
|
3
|
+
import { getCommonProps as w } from "../../utils/index.js";
|
|
4
|
+
import { TransformWrapper as x, TransformComponent as T } from "../../node_modules/react-zoom-pan-pinch/dist/index.esm.js";
|
|
5
|
+
import c from "../../node_modules/classnames/index.js";
|
|
6
|
+
const $ = ({ onZoomChange: s, children: e, maxZoom: i = 10, className: f, ...r }) => {
|
|
7
|
+
var l;
|
|
8
|
+
const { className: t, ...d } = w(r, "PinchZoom"), [a, m] = N(!1), u = b(
|
|
9
|
+
(P) => {
|
|
10
|
+
const { state: o } = P;
|
|
11
|
+
o.scale > 0.99 && o.scale < 1.01 ? (m(!1), s == null || s(!1)) : (m(!0), s == null || s(!0));
|
|
12
|
+
},
|
|
13
|
+
[s]
|
|
14
|
+
);
|
|
15
|
+
return /* @__PURE__ */ p(
|
|
16
|
+
x,
|
|
17
|
+
{
|
|
18
|
+
maxScale: i,
|
|
19
|
+
onTransformed: u,
|
|
20
|
+
minScale: 1,
|
|
21
|
+
disablePadding: !0,
|
|
22
|
+
doubleClick: {
|
|
23
|
+
mode: a ? "reset" : "toggle"
|
|
24
|
+
},
|
|
25
|
+
wheel: {
|
|
26
|
+
smoothStep: 0.01
|
|
27
|
+
},
|
|
28
|
+
panning: {
|
|
29
|
+
disabled: !a
|
|
30
|
+
},
|
|
31
|
+
children: /* @__PURE__ */ p(
|
|
32
|
+
T,
|
|
33
|
+
{
|
|
34
|
+
wrapperProps: { ...d, ...r },
|
|
35
|
+
wrapperClass: c(t, f, {
|
|
36
|
+
[`${t}-zoomed`]: a
|
|
37
|
+
}),
|
|
38
|
+
contentClass: `${t}-content`,
|
|
39
|
+
children: n(e) ? S(e, { className: c(`${t}-child`, (l = e == null ? void 0 : e.props) == null ? void 0 : l.className) }) : e
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
$.displayName = "PinchZoom";
|
|
46
|
+
export {
|
|
47
|
+
$ as default
|
|
48
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as PinchZoom, type PinchZoomProps } from './PinchZoom';
|
|
@@ -42,7 +42,7 @@ const ne = ({
|
|
|
42
42
|
}
|
|
43
43
|
e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.click();
|
|
44
44
|
}
|
|
45
|
-
e.key === "Escape" && (
|
|
45
|
+
e.key === "Escape" && ((n = p.current) == null || n.reset(), o.setIsSearchExpanded(!1));
|
|
46
46
|
};
|
|
47
47
|
V(() => {
|
|
48
48
|
var e;
|
|
@@ -53,7 +53,7 @@ const ne = ({
|
|
|
53
53
|
}, [t]);
|
|
54
54
|
const g = (e) => {
|
|
55
55
|
var n;
|
|
56
|
-
|
|
56
|
+
(n = p.current) == null || n.reset(), o.setIsSearchExpanded(e);
|
|
57
57
|
};
|
|
58
58
|
return /* @__PURE__ */ a("div", { className: `${r}__container`, children: /* @__PURE__ */ u(
|
|
59
59
|
"div",
|
package/dist/index.d.ts
CHANGED
|
@@ -46,3 +46,4 @@ export * from './components/Collapsible';
|
|
|
46
46
|
export * from './providers/SeldonProvider';
|
|
47
47
|
export { default as PageContentWrapper } from './components/PageContentWrapper/PageContentWrapper';
|
|
48
48
|
export * from './components/Carousel';
|
|
49
|
+
export * from './components/PinchZoom';
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PaddingTokens as f, SpacingTokens as p, defaultYear as l, emailValidation as
|
|
1
|
+
import { PaddingTokens as f, SpacingTokens as p, defaultYear as l, emailValidation as m, encodeURLSearchParams as s, findChildrenExcludingTypes as d, findChildrenOfType as u, generatePaddingClassName as i, getCommonProps as n, noOp as x, px as g, useNormalizedInputProps as c } from "./utils/index.js";
|
|
2
2
|
import { default as C } from "./pages/Page.js";
|
|
3
|
-
import { default as
|
|
3
|
+
import { default as L } from "./components/Button/Button.js";
|
|
4
4
|
import { ButtonVariants as T } from "./components/Button/types.js";
|
|
5
5
|
import { default as b } from "./components/IconButton/IconButton.js";
|
|
6
6
|
import { default as B } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
7
|
-
import { default as
|
|
7
|
+
import { default as A } from "./site-furniture/Footer/Footer.js";
|
|
8
8
|
import { Grid as v } from "./components/Grid/Grid.js";
|
|
9
9
|
import { default as y } from "./site-furniture/Header/Header.js";
|
|
10
10
|
import { default as G } from "./components/Navigation/Navigation.js";
|
|
@@ -13,25 +13,25 @@ import { default as O } from "./components/Navigation/NavigationItemTrigger/Navi
|
|
|
13
13
|
import { default as U } from "./components/Navigation/NavigationList/NavigationList.js";
|
|
14
14
|
import { default as F } from "./patterns/HeroBanner/HeroBanner.js";
|
|
15
15
|
import { default as Y } from "./components/Input/Input.js";
|
|
16
|
-
import { default as
|
|
17
|
-
import { LinkVariants as
|
|
18
|
-
import { default as
|
|
16
|
+
import { default as j } from "./components/Link/Link.js";
|
|
17
|
+
import { LinkVariants as J } from "./components/Link/types.js";
|
|
18
|
+
import { default as Q } from "./components/LinkBlock/LinkBlock.js";
|
|
19
19
|
import { default as _ } from "./components/LinkList/LinkList.js";
|
|
20
20
|
import { default as ee } from "./components/Row/Row.js";
|
|
21
21
|
import { default as re } from "./components/GridItem/GridItem.js";
|
|
22
22
|
import { GridItemAlign as ae } from "./components/GridItem/types.js";
|
|
23
23
|
import { default as pe } from "./components/Search/Search.js";
|
|
24
|
-
import { default as
|
|
24
|
+
import { default as me } from "./components/Select/Select.js";
|
|
25
25
|
import { default as de } from "./components/SplitPanel/SplitPanel.js";
|
|
26
26
|
import { default as ie } from "./patterns/Subscribe/Subscribe.js";
|
|
27
27
|
import { SubscriptionState as xe } from "./patterns/Subscribe/types.js";
|
|
28
28
|
import { default as ce } from "./patterns/Social/Social.js";
|
|
29
29
|
import { default as Ce } from "./patterns/ViewingsList/ViewingsList.js";
|
|
30
|
-
import { default as
|
|
30
|
+
import { default as Le } from "./components/Modal/Modal.js";
|
|
31
31
|
import { default as Te } from "./components/Drawer/Drawer.js";
|
|
32
32
|
import { default as be } from "./components/Pagination/Pagination.js";
|
|
33
33
|
import { default as Be } from "./patterns/ViewingsList/StatefulViewingsList.js";
|
|
34
|
-
import { TextVariants as
|
|
34
|
+
import { TextVariants as Ae } from "./components/Text/types.js";
|
|
35
35
|
import { default as ve } from "./components/Text/Text.js";
|
|
36
36
|
import { TextSymbolVariants as ye } from "./components/TextSymbol/types.js";
|
|
37
37
|
import { default as Ge } from "./components/TextSymbol/TextSymbol.js";
|
|
@@ -39,46 +39,47 @@ import { default as He } from "./components/Accordion/Accordion.js";
|
|
|
39
39
|
import { default as Oe } from "./components/Accordion/AccordionItem.js";
|
|
40
40
|
import { AccordionItemVariant as Ue, AccordionVariants as ze } from "./components/Accordion/types.js";
|
|
41
41
|
import { default as We } from "./patterns/UserManagement/UserManagement.js";
|
|
42
|
-
import { AuthState as
|
|
43
|
-
import { SupportedLanguages as
|
|
44
|
-
import { default as
|
|
42
|
+
import { AuthState as Ze } from "./patterns/UserManagement/types.js";
|
|
43
|
+
import { SupportedLanguages as qe } from "./types/commonTypes.js";
|
|
44
|
+
import { default as Ke } from "./components/Breadcrumb/Breadcrumb.js";
|
|
45
45
|
import "react/jsx-runtime";
|
|
46
46
|
import "./node_modules/classnames/index.js";
|
|
47
47
|
import "react";
|
|
48
|
-
import { default as
|
|
48
|
+
import { default as Xe } from "./components/Dropdown/Dropdown.js";
|
|
49
49
|
import { default as $e } from "./components/Video/Video.js";
|
|
50
50
|
import { default as oo } from "./patterns/LanguageSelector/LanguageSelector.js";
|
|
51
51
|
import { default as to } from "./components/ContentPeek/ContentPeek.js";
|
|
52
52
|
import { default as fo } from "./components/Collapsible/Collapsible.js";
|
|
53
53
|
import { default as lo } from "./components/Collapsible/CollapsibleContent.js";
|
|
54
|
-
import { default as
|
|
54
|
+
import { default as so } from "./components/Collapsible/CollapsibleTrigger.js";
|
|
55
55
|
import { SeldonProvider as io } from "./providers/SeldonProvider.js";
|
|
56
56
|
import { default as xo } from "./components/PageContentWrapper/PageContentWrapper.js";
|
|
57
57
|
import { default as co } from "./components/Carousel/Carousel.js";
|
|
58
58
|
import { default as Co } from "./components/Carousel/CarouselContent.js";
|
|
59
|
-
import { default as
|
|
59
|
+
import { default as Lo } from "./components/Carousel/CarouselItem.js";
|
|
60
60
|
import { default as To } from "./components/Carousel/CarouselDots.js";
|
|
61
|
+
import { default as bo } from "./components/PinchZoom/PinchZoom.js";
|
|
61
62
|
export {
|
|
62
63
|
He as Accordion,
|
|
63
64
|
Oe as AccordionItem,
|
|
64
65
|
Ue as AccordionItemVariant,
|
|
65
66
|
ze as AccordionVariants,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
Ze as AuthState,
|
|
68
|
+
Ke as Breadcrumb,
|
|
69
|
+
L as Button,
|
|
69
70
|
T as ButtonVariants,
|
|
70
71
|
co as Carousel,
|
|
71
72
|
Co as CarouselContent,
|
|
72
73
|
To as CarouselDots,
|
|
73
|
-
|
|
74
|
+
Lo as CarouselItem,
|
|
74
75
|
fo as Collapsible,
|
|
75
76
|
lo as CollapsibleContent,
|
|
76
|
-
|
|
77
|
+
so as CollapsibleTrigger,
|
|
77
78
|
to as ContentPeek,
|
|
78
79
|
Te as Drawer,
|
|
79
|
-
|
|
80
|
+
Xe as Dropdown,
|
|
80
81
|
B as ErrorBoundary,
|
|
81
|
-
|
|
82
|
+
A as Footer,
|
|
82
83
|
v as Grid,
|
|
83
84
|
re as GridItem,
|
|
84
85
|
ae as GridItemAlign,
|
|
@@ -87,11 +88,11 @@ export {
|
|
|
87
88
|
b as IconButton,
|
|
88
89
|
Y as Input,
|
|
89
90
|
oo as LanguageSelector,
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
j as Link,
|
|
92
|
+
Q as LinkBlock,
|
|
92
93
|
_ as LinkList,
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
J as LinkVariants,
|
|
95
|
+
Le as Modal,
|
|
95
96
|
G as Navigation,
|
|
96
97
|
H as NavigationItem,
|
|
97
98
|
O as NavigationItemTrigger,
|
|
@@ -100,27 +101,28 @@ export {
|
|
|
100
101
|
C as Page,
|
|
101
102
|
xo as PageContentWrapper,
|
|
102
103
|
be as Pagination,
|
|
104
|
+
bo as PinchZoom,
|
|
103
105
|
ee as Row,
|
|
104
106
|
pe as Search,
|
|
105
107
|
io as SeldonProvider,
|
|
106
|
-
|
|
108
|
+
me as Select,
|
|
107
109
|
ce as Social,
|
|
108
110
|
p as SpacingTokens,
|
|
109
111
|
de as SplitPanel,
|
|
110
112
|
Be as StatefulViewingsList,
|
|
111
113
|
ie as Subscribe,
|
|
112
114
|
xe as SubscriptionState,
|
|
113
|
-
|
|
115
|
+
qe as SupportedLanguages,
|
|
114
116
|
ve as Text,
|
|
115
117
|
ye as TextSymbolVariants,
|
|
116
118
|
Ge as TextSymbols,
|
|
117
|
-
|
|
119
|
+
Ae as TextVariants,
|
|
118
120
|
We as UserManagement,
|
|
119
121
|
$e as Video,
|
|
120
122
|
Ce as ViewingsList,
|
|
121
123
|
l as defaultYear,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
+
m as emailValidation,
|
|
125
|
+
s as encodeURLSearchParams,
|
|
124
126
|
d as findChildrenExcludingTypes,
|
|
125
127
|
u as findChildrenOfType,
|
|
126
128
|
i as generatePaddingClassName,
|