@phillips/seldon 1.72.1 → 1.73.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/CarouselDots.js +16 -16
- package/dist/components/Detail/Detail.d.ts +4 -4
- package/dist/components/Detail/Detail.js +11 -10
- package/dist/index.js +42 -40
- package/dist/patterns/DetailList/DetailList.d.ts +4 -4
- package/dist/patterns/DetailList/DetailList.js +20 -20
- package/dist/patterns/DetailList/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import d from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { forwardRef as D, useId as P, useState as S, useCallback as f, useEffect as V } from "react";
|
|
4
|
-
import { useCarousel as
|
|
5
|
-
import { getCommonProps as
|
|
6
|
-
const
|
|
7
|
-
({ className: $, maxDots:
|
|
8
|
-
const { className: s, ...C } =
|
|
4
|
+
import { useCarousel as j } from "./utils.js";
|
|
5
|
+
import { getCommonProps as w } from "../../utils/index.js";
|
|
6
|
+
const A = D(
|
|
7
|
+
({ className: $, maxDots: i = 7, position: h = "inline", numberOfSlides: N = 0, ...u }, b) => {
|
|
8
|
+
const { className: s, ...C } = w(u, "Carousel"), M = P(), { api: e, onSlideChange: n } = j(), [g, v] = S(0), [l, x] = S(
|
|
9
9
|
Array.from({ length: N }, (t, o) => o)
|
|
10
|
-
),
|
|
10
|
+
), k = f(
|
|
11
11
|
(t) => {
|
|
12
12
|
e && (e.scrollTo(t, !0), n == null || n(t));
|
|
13
13
|
},
|
|
14
14
|
[e, n]
|
|
15
15
|
), p = f((t) => {
|
|
16
|
-
|
|
16
|
+
x(t.scrollSnapList());
|
|
17
17
|
}, []), a = f((t) => {
|
|
18
18
|
v(t.selectedScrollSnap());
|
|
19
19
|
}, []), m = f(
|
|
@@ -29,11 +29,11 @@ const w = D(
|
|
|
29
29
|
};
|
|
30
30
|
}, [e, p, a, m]);
|
|
31
31
|
const I = (() => {
|
|
32
|
-
if (
|
|
33
|
-
const t = Math.floor(
|
|
32
|
+
if (l.length <= i) return l;
|
|
33
|
+
const t = Math.floor(i / 2);
|
|
34
34
|
let o = Math.max(0, g - t);
|
|
35
|
-
const r = Math.min(
|
|
36
|
-
return r - o <
|
|
35
|
+
const r = Math.min(l.length, o + i);
|
|
36
|
+
return r - o < i && (o = Math.max(0, r - i)), l.slice(o, r);
|
|
37
37
|
})();
|
|
38
38
|
return /* @__PURE__ */ c(
|
|
39
39
|
"div",
|
|
@@ -46,12 +46,12 @@ const w = D(
|
|
|
46
46
|
...u,
|
|
47
47
|
...C,
|
|
48
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 =
|
|
49
|
+
const r = l.indexOf(I[o]), y = g === r;
|
|
50
50
|
return /* @__PURE__ */ c(
|
|
51
51
|
"button",
|
|
52
52
|
{
|
|
53
53
|
role: "button",
|
|
54
|
-
onClick: () =>
|
|
54
|
+
onClick: () => k(r),
|
|
55
55
|
className: d(`${s}-pagination-dot-container`),
|
|
56
56
|
children: /* @__PURE__ */ c(
|
|
57
57
|
"span",
|
|
@@ -62,14 +62,14 @@ const w = D(
|
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
},
|
|
65
|
-
`${M}-dot-${
|
|
65
|
+
`${M}-dot-${t}`
|
|
66
66
|
);
|
|
67
67
|
}) }) })
|
|
68
68
|
}
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
);
|
|
72
|
-
|
|
72
|
+
A.displayName = "CarouselDots";
|
|
73
73
|
export {
|
|
74
|
-
|
|
74
|
+
A as default
|
|
75
75
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
2
|
export interface DetailProps extends ComponentProps<'div'> {
|
|
3
|
-
label:
|
|
4
|
-
value:
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
value: React.ReactNode;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* ## Overview
|
|
@@ -13,6 +13,6 @@ export interface DetailProps extends ComponentProps<'div'> {
|
|
|
13
13
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-detail--overview)
|
|
14
14
|
*
|
|
15
15
|
*/
|
|
16
|
-
declare const Detail:
|
|
16
|
+
declare const Detail: React.ForwardRefExoticComponent<Omit<DetailProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export type DetailComponent = ReturnType<typeof Detail>;
|
|
18
18
|
export default Detail;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/* @__PURE__ */
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { getCommonProps as d } from "../../utils/index.js";
|
|
4
|
+
import n from "../../node_modules/classnames/index.js";
|
|
5
|
+
const f = c(({ className: m = "", label: l, value: o, ...s }, r) => {
|
|
6
|
+
const { className: a, ...t } = d(s, "Detail");
|
|
7
|
+
return /* @__PURE__ */ i("div", { ...t, className: n(a, m), ...s, ref: r, children: [
|
|
8
|
+
/* @__PURE__ */ e("dt", { className: `${a}__label`, children: l }),
|
|
9
|
+
/* @__PURE__ */ e("dd", { className: `${a}__value`, children: o })
|
|
9
10
|
] });
|
|
10
11
|
});
|
|
11
|
-
|
|
12
|
+
f.displayName = "Detail";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
f as default
|
|
14
15
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { PaddingTokens as f, SpacingTokens as l, defaultYear as
|
|
1
|
+
import { PaddingTokens as f, SpacingTokens as l, defaultYear as m, emailValidation as p, encodeURLSearchParams as s, findChildrenExcludingTypes as d, findChildrenOfType as i, generatePaddingClassName as u, getCommonProps as x, noOp as n, px as g, useNormalizedInputProps as c } from "./utils/index.js";
|
|
2
2
|
import { default as C } from "./pages/Page.js";
|
|
3
3
|
import { default as P } 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
|
-
import { default as
|
|
7
|
-
import { default as
|
|
8
|
-
import { Grid as
|
|
9
|
-
import { default as
|
|
6
|
+
import { default as A } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
7
|
+
import { default as h } from "./site-furniture/Footer/Footer.js";
|
|
8
|
+
import { Grid as N } from "./components/Grid/Grid.js";
|
|
9
|
+
import { default as w } from "./site-furniture/Header/Header.js";
|
|
10
10
|
import { default as G } from "./components/Navigation/Navigation.js";
|
|
11
11
|
import { default as H } from "./components/Navigation/NavigationItem/NavigationItem.js";
|
|
12
12
|
import { default as O } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
|
|
@@ -18,22 +18,22 @@ import { LinkVariants as J } from "./components/Link/types.js";
|
|
|
18
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
|
-
import { default as
|
|
21
|
+
import { default as te } from "./components/GridItem/GridItem.js";
|
|
22
22
|
import { GridItemAlign as ae } from "./components/GridItem/types.js";
|
|
23
23
|
import { default as le } from "./components/Search/Search.js";
|
|
24
|
-
import { default as
|
|
24
|
+
import { default as pe } from "./components/Select/Select.js";
|
|
25
25
|
import { default as de } from "./components/SplitPanel/SplitPanel.js";
|
|
26
|
-
import { default as
|
|
26
|
+
import { default as ue } from "./patterns/Subscribe/Subscribe.js";
|
|
27
27
|
import { SubscriptionState as ne } 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
30
|
import { default as Pe } 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
|
-
import { default as
|
|
34
|
-
import { TextVariants as
|
|
35
|
-
import { default as
|
|
36
|
-
import { TextSymbolVariants as
|
|
33
|
+
import { default as Ae } from "./patterns/ViewingsList/StatefulViewingsList.js";
|
|
34
|
+
import { TextVariants as he } from "./components/Text/types.js";
|
|
35
|
+
import { default as Ne } from "./components/Text/Text.js";
|
|
36
|
+
import { TextSymbolVariants as we } from "./components/TextSymbol/types.js";
|
|
37
37
|
import { default as Ge } from "./components/TextSymbol/TextSymbol.js";
|
|
38
38
|
import { default as He } from "./components/Accordion/Accordion.js";
|
|
39
39
|
import { default as Oe } from "./components/Accordion/AccordionItem.js";
|
|
@@ -48,19 +48,20 @@ import "react";
|
|
|
48
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
|
-
import { default as
|
|
51
|
+
import { default as ro } from "./components/ContentPeek/ContentPeek.js";
|
|
52
52
|
import { default as fo } from "./components/Collapsible/Collapsible.js";
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { SeldonProvider as
|
|
53
|
+
import { default as mo } from "./components/Collapsible/CollapsibleContent.js";
|
|
54
|
+
import { default as so } from "./components/Collapsible/CollapsibleTrigger.js";
|
|
55
|
+
import { SeldonProvider as uo } from "./providers/SeldonProvider.js";
|
|
56
56
|
import { default as no } 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
59
|
import { default as Po } from "./components/Carousel/CarouselItem.js";
|
|
60
60
|
import { default as To } from "./components/Carousel/CarouselDots.js";
|
|
61
61
|
import { default as bo } from "./components/Detail/Detail.js";
|
|
62
|
-
import { default as
|
|
63
|
-
import {
|
|
62
|
+
import { default as Ao } from "./patterns/DetailList/DetailList.js";
|
|
63
|
+
import { DetailListAlignment as ho } from "./patterns/DetailList/types.js";
|
|
64
|
+
import { default as No } from "./components/PinchZoom/PinchZoom.js";
|
|
64
65
|
export {
|
|
65
66
|
He as Accordion,
|
|
66
67
|
Oe as AccordionItem,
|
|
@@ -75,19 +76,20 @@ export {
|
|
|
75
76
|
To as CarouselDots,
|
|
76
77
|
Po as CarouselItem,
|
|
77
78
|
fo as Collapsible,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
mo as CollapsibleContent,
|
|
80
|
+
so as CollapsibleTrigger,
|
|
81
|
+
ro as ContentPeek,
|
|
81
82
|
bo as Detail,
|
|
82
|
-
|
|
83
|
+
Ao as DetailList,
|
|
84
|
+
ho as DetailListAlignment,
|
|
83
85
|
Te as Drawer,
|
|
84
86
|
Xe as Dropdown,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
A as ErrorBoundary,
|
|
88
|
+
h as Footer,
|
|
89
|
+
N as Grid,
|
|
90
|
+
te as GridItem,
|
|
89
91
|
ae as GridItemAlign,
|
|
90
|
-
|
|
92
|
+
w as Header,
|
|
91
93
|
F as HeroBanner,
|
|
92
94
|
b as IconButton,
|
|
93
95
|
Y as Input,
|
|
@@ -105,31 +107,31 @@ export {
|
|
|
105
107
|
C as Page,
|
|
106
108
|
no as PageContentWrapper,
|
|
107
109
|
be as Pagination,
|
|
108
|
-
|
|
110
|
+
No as PinchZoom,
|
|
109
111
|
ee as Row,
|
|
110
112
|
le as Search,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
uo as SeldonProvider,
|
|
114
|
+
pe as Select,
|
|
113
115
|
ce as Social,
|
|
114
116
|
l as SpacingTokens,
|
|
115
117
|
de as SplitPanel,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
Ae as StatefulViewingsList,
|
|
119
|
+
ue as Subscribe,
|
|
118
120
|
ne as SubscriptionState,
|
|
119
121
|
qe as SupportedLanguages,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
Ne as Text,
|
|
123
|
+
we as TextSymbolVariants,
|
|
122
124
|
Ge as TextSymbols,
|
|
123
|
-
|
|
125
|
+
he as TextVariants,
|
|
124
126
|
We as UserManagement,
|
|
125
127
|
$e as Video,
|
|
126
128
|
Ce as ViewingsList,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
m as defaultYear,
|
|
130
|
+
p as emailValidation,
|
|
131
|
+
s as encodeURLSearchParams,
|
|
130
132
|
d as findChildrenExcludingTypes,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
i as findChildrenOfType,
|
|
134
|
+
u as generatePaddingClassName,
|
|
133
135
|
x as getCommonProps,
|
|
134
136
|
n as noOp,
|
|
135
137
|
g as px,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
-
import { DetailComponent } from '../../components/Detail';
|
|
3
2
|
import { DetailListAlignment } from './types';
|
|
3
|
+
import { DetailComponent } from '../../components/Detail';
|
|
4
4
|
export interface DetailListProps extends ComponentProps<'dl'> {
|
|
5
5
|
/**
|
|
6
6
|
* Determines whether each Details' label and value are aligned in columns or justified
|
|
7
7
|
*/
|
|
8
|
-
alignment
|
|
8
|
+
alignment?: DetailListAlignment;
|
|
9
9
|
/**
|
|
10
10
|
* The Detail components to render
|
|
11
11
|
*/
|
|
12
|
-
children: DetailComponent[];
|
|
12
|
+
children: DetailComponent[] | DetailComponent;
|
|
13
13
|
/**
|
|
14
14
|
* Whether to render separators between each Detail component
|
|
15
15
|
*/
|
|
16
|
-
hasSeparators
|
|
16
|
+
hasSeparators?: boolean;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* ## Overview
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as N } from "react";
|
|
3
|
-
import
|
|
3
|
+
import l from "../../node_modules/classnames/index.js";
|
|
4
4
|
import { getCommonProps as $, px as s } from "../../utils/index.js";
|
|
5
|
-
import { DetailListAlignment as
|
|
6
|
-
import { getDetailKey as
|
|
5
|
+
import { DetailListAlignment as o } from "./types.js";
|
|
6
|
+
import { getDetailKey as n } from "./utils.js";
|
|
7
7
|
const D = N(
|
|
8
|
-
({ alignment: o, className: p, children:
|
|
9
|
-
const { className:
|
|
10
|
-
return /* @__PURE__ */
|
|
8
|
+
({ alignment: t = o.justified, className: p, children: a, hasSeparators: u = !1, ...e }, c) => {
|
|
9
|
+
const { className: i, ...d } = $(e, "DetailList"), m = Array.isArray(a) ? a : [a];
|
|
10
|
+
return /* @__PURE__ */ f(
|
|
11
11
|
"dl",
|
|
12
12
|
{
|
|
13
|
-
...
|
|
14
|
-
className:
|
|
15
|
-
[`${s}-columns`]:
|
|
16
|
-
[`${s}-justified`]:
|
|
13
|
+
...d,
|
|
14
|
+
className: l(i, p, {
|
|
15
|
+
[`${s}-columns`]: t === o.columns,
|
|
16
|
+
[`${s}-justified`]: t === o.justified
|
|
17
17
|
}),
|
|
18
|
-
...
|
|
19
|
-
ref:
|
|
20
|
-
children:
|
|
18
|
+
...e,
|
|
19
|
+
ref: c,
|
|
20
|
+
children: m == null ? void 0 : m.map((r, j) => /* @__PURE__ */ f(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
|
-
className:
|
|
24
|
-
[`${s}-has-separators`]:
|
|
25
|
-
[`${s}-columns`]:
|
|
26
|
-
[`${s}-justified`]:
|
|
23
|
+
className: l(`${i}-wrapper`, {
|
|
24
|
+
[`${s}-has-separators`]: u,
|
|
25
|
+
[`${s}-columns`]: t === o.columns,
|
|
26
|
+
[`${s}-justified`]: t === o.justified
|
|
27
27
|
}),
|
|
28
|
-
children:
|
|
28
|
+
children: r
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
n(r, j)
|
|
31
31
|
))
|
|
32
32
|
}
|
|
33
33
|
);
|