@phillips/seldon 1.171.0 → 1.171.1
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/CarouselDot.d.ts +2 -3
- package/dist/components/Carousel/CarouselDot.test.d.ts +0 -0
- package/dist/components/Carousel/CarouselDots.test.d.ts +0 -0
- package/dist/components/Carousel/CarouselKeyboardNavigation.test.d.ts +1 -0
- package/dist/components/ComposedModal/ComposedModal.js +21 -20
- package/dist/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.js +19 -19
- package/dist/components/Grid/Grid.d.ts +6 -3
- package/dist/components/Grid/Grid.js +20 -18
- package/dist/components/GridItem/GridItem.d.ts +1 -2
- package/dist/components/GridItem/GridItem.js +29 -26
- package/dist/components/GridItem/GridItem.stories.d.ts +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +24 -26
- package/dist/components/Link/Link.stories.d.ts +1 -1
- package/dist/components/Link/types.js +1 -3
- package/dist/components/LinkBlock/LinkBlock.d.ts +1 -1
- package/dist/components/LinkBlock/LinkBlock.js +16 -12
- package/dist/components/LinkBlock/LinkBlock.stories.d.ts +1 -1
- package/dist/components/LinkList/LinkList.d.ts +1 -2
- package/dist/components/LinkList/LinkList.js +21 -8
- package/dist/components/LinkList/LinkList.stories.d.ts +2 -2
- package/dist/components/Pagination/Pagination.d.ts +2 -2
- package/dist/components/Pagination/Pagination.js +98 -94
- package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
- package/dist/components/PinchZoom/PinchZoom.d.ts +1 -2
- package/dist/components/PinchZoom/PinchZoom.js +54 -58
- package/dist/components/PinchZoom/PinchZoom.stories.d.ts +1 -1
- package/dist/components/Row/Row.d.ts +1 -2
- package/dist/components/Row/Row.js +31 -26
- package/dist/components/Row/Row.stories.d.ts +1 -1
- package/dist/components/Search/Search.d.ts +3 -2
- package/dist/components/Search/Search.js +160 -157
- package/dist/components/SplitPanel/SplitPanel.d.ts +1 -1
- package/dist/components/SplitPanel/SplitPanel.js +20 -21
- package/dist/components/SplitPanel/SplitPanel.stories.d.ts +1 -1
- package/dist/components/Text/Text.d.ts +1 -2
- package/dist/components/Text/Text.js +31 -34
- package/dist/components/Text/Text.stories.d.ts +1 -1
- package/dist/components/TextSymbol/TextSymbol.d.ts +1 -1
- package/dist/components/TextSymbol/TextSymbol.js +20 -7
- package/dist/components/TextSymbol/TextSymbol.stories.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/patterns/HeroBanner/HeroBanner.d.ts +1 -1
- package/dist/patterns/HeroBanner/HeroBanner.js +30 -34
- package/dist/patterns/HeroBanner/HeroBanner.stories.d.ts +1 -1
- package/dist/patterns/LanguageSelector/LanguageSelector.js +66 -61
- package/dist/patterns/Social/Social.d.ts +1 -1
- package/dist/patterns/Social/Social.js +27 -23
- package/dist/patterns/Social/Social.stories.d.ts +1 -1
- package/dist/patterns/Subscribe/Subscribe.d.ts +2 -1
- package/dist/patterns/Subscribe/Subscribe.js +77 -62
- package/dist/patterns/Subscribe/Subscribe.stories.d.ts +1 -1
- package/dist/patterns/ViewingsList/StatefulViewingsList.d.ts +1 -1
- package/dist/patterns/ViewingsList/StatefulViewingsList.js +28 -31
- package/dist/patterns/ViewingsList/ViewingsList.d.ts +1 -1
- package/dist/patterns/ViewingsList/ViewingsList.js +40 -39
- package/dist/patterns/ViewingsList/ViewingsList.stories.d.ts +1 -1
- package/dist/utils/testUtils.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
|
-
interface
|
|
2
|
+
export interface CarouselDotProps extends ComponentProps<'button'> {
|
|
3
3
|
/** Whether the dot is selected */
|
|
4
4
|
isSelected: boolean;
|
|
5
5
|
/** Callback function when the dot is clicked */
|
|
@@ -11,5 +11,4 @@ interface Props extends ComponentProps<'button'> {
|
|
|
11
11
|
/** Variant of the dot */
|
|
12
12
|
variant?: 'sm' | 'md';
|
|
13
13
|
}
|
|
14
|
-
export declare const CarouselDot: ({ isSelected, onClick, scrollableContainerRef, onInViewChange, variant, ...props }:
|
|
15
|
-
export {};
|
|
14
|
+
export declare const CarouselDot: ({ isSelected, onClick, scrollableContainerRef, onInViewChange, variant, ...props }: CarouselDotProps) => import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsxs as s, jsx as i, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { getCommonProps as
|
|
1
|
+
import { jsxs as s, jsx as i, Fragment as C } from "react/jsx-runtime";
|
|
2
|
+
import g from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { forwardRef as x } from "react";
|
|
4
|
+
import { getCommonProps as k, noOp as M } from "../../utils/index.js";
|
|
5
5
|
import d from "../Button/Button.js";
|
|
6
6
|
import { ButtonVariants as t } from "../Button/types.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import y from "../Divider/Divider.js";
|
|
8
|
+
import j from "../Modal/Modal.js";
|
|
9
9
|
import { TextVariants as n } from "../Text/types.js";
|
|
10
10
|
import c from "../Text/Text.js";
|
|
11
|
-
const
|
|
11
|
+
const L = x(
|
|
12
12
|
({
|
|
13
13
|
children: p,
|
|
14
14
|
className: f,
|
|
15
|
-
overlayClassName:
|
|
15
|
+
overlayClassName: P,
|
|
16
16
|
isOpen: h = !1,
|
|
17
|
-
onClose: v =
|
|
17
|
+
onClose: v = M,
|
|
18
18
|
maxHeightValue: b = "60vh",
|
|
19
19
|
title: N,
|
|
20
20
|
footerContent: o,
|
|
@@ -22,21 +22,22 @@ const j = g(
|
|
|
22
22
|
primaryButton: e,
|
|
23
23
|
id: m,
|
|
24
24
|
...l
|
|
25
|
-
}) => {
|
|
25
|
+
}, _) => {
|
|
26
26
|
const {
|
|
27
27
|
className: a,
|
|
28
|
-
"data-testid":
|
|
29
|
-
|
|
30
|
-
} =
|
|
28
|
+
"data-testid": T,
|
|
29
|
+
...$
|
|
30
|
+
} = k({ id: m, ...l }, "ComposedModal");
|
|
31
31
|
return /* @__PURE__ */ s(
|
|
32
|
-
|
|
32
|
+
j,
|
|
33
33
|
{
|
|
34
34
|
isOpen: h,
|
|
35
35
|
onClose: v,
|
|
36
36
|
...l,
|
|
37
|
-
|
|
38
|
-
className:
|
|
37
|
+
...$,
|
|
38
|
+
className: g(`${a}`, f),
|
|
39
39
|
id: m,
|
|
40
|
+
ref: _,
|
|
40
41
|
children: [
|
|
41
42
|
/* @__PURE__ */ i(c, { variant: n.heading3, className: `${a}__title`, children: N }),
|
|
42
43
|
/* @__PURE__ */ i(
|
|
@@ -47,8 +48,8 @@ const j = g(
|
|
|
47
48
|
children: p
|
|
48
49
|
}
|
|
49
50
|
),
|
|
50
|
-
(r || e || o) && /* @__PURE__ */ s(
|
|
51
|
-
/* @__PURE__ */ i(
|
|
51
|
+
(r || e || o) && /* @__PURE__ */ s(C, { children: [
|
|
52
|
+
/* @__PURE__ */ i(y, { className: `${a}__divider`, id: `${m}-divider` }),
|
|
52
53
|
/* @__PURE__ */ s("div", { className: `${a}__btns-group`, children: [
|
|
53
54
|
r && /* @__PURE__ */ i(d, { id: `${m}-secondary-btn`, variant: t.secondary, onClick: r.onClick, children: r.buttonLabel }),
|
|
54
55
|
e && /* @__PURE__ */ i(d, { id: `${m}-primary-btn`, variant: t.primary, onClick: e.onClick, children: e.buttonLabel })
|
|
@@ -60,7 +61,7 @@ const j = g(
|
|
|
60
61
|
);
|
|
61
62
|
}
|
|
62
63
|
);
|
|
63
|
-
|
|
64
|
+
L.displayName = "ComposedModal";
|
|
64
65
|
export {
|
|
65
|
-
|
|
66
|
+
L as default
|
|
66
67
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { DropdownItem } from './types';
|
|
3
3
|
import * as DropdownSelect from '@radix-ui/react-select';
|
|
4
4
|
export interface DropdownProps extends Omit<DropdownSelect.SelectProps, 'defaultValue' | 'dir'>, ComponentPropsWithoutRef<'div'> {
|
|
@@ -32,5 +32,5 @@ export interface DropdownProps extends Omit<DropdownSelect.SelectProps, 'default
|
|
|
32
32
|
*
|
|
33
33
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-dropdown--overview)
|
|
34
34
|
*/
|
|
35
|
-
declare const Dropdown:
|
|
35
|
+
declare const Dropdown: import('react').ForwardRefExoticComponent<DropdownProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
36
36
|
export default Dropdown;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { forwardRef as p, useState as C } from "react";
|
|
3
3
|
import { getCommonProps as D } from "../../utils/index.js";
|
|
4
4
|
import i from "../../node_modules/classnames/index.js";
|
|
5
|
-
import { Root as $, Trigger as v, Value as I, Icon as b, Portal as x, Content as
|
|
5
|
+
import { Root as $, Trigger as v, Value as I, Icon as b, Portal as x, Content as S, ScrollUpButton as O, Viewport as P, ScrollDownButton as R, Item as V, ItemText as j } from "../../node_modules/@radix-ui/react-select/dist/index.js";
|
|
6
6
|
import c from "../Icon/Icon.js";
|
|
7
|
-
const y =
|
|
8
|
-
({ options:
|
|
9
|
-
const { className: o, ...u } = D({ id: m }, "Dropdown"), [
|
|
10
|
-
return /* @__PURE__ */ e("div", { className: i(o, h), id: m, ...u, ...
|
|
7
|
+
const y = p(
|
|
8
|
+
({ options: a, value: n, onValueChange: l, label: s, className: h, id: m, disabled: _, ...w }, N) => {
|
|
9
|
+
const { className: o, ...u } = D({ id: m }, "Dropdown"), [f, g] = C(!1);
|
|
10
|
+
return /* @__PURE__ */ e("div", { className: i(o, h), id: m, ...u, ...w, children: /* @__PURE__ */ t(
|
|
11
11
|
$,
|
|
12
12
|
{
|
|
13
|
-
value:
|
|
13
|
+
value: n,
|
|
14
14
|
onValueChange: (r) => {
|
|
15
15
|
l(r);
|
|
16
16
|
},
|
|
@@ -21,15 +21,15 @@ const y = d.forwardRef(
|
|
|
21
21
|
{
|
|
22
22
|
className: `${o}__trigger`,
|
|
23
23
|
"aria-label": s,
|
|
24
|
-
ref:
|
|
24
|
+
ref: N,
|
|
25
25
|
disabled: _,
|
|
26
26
|
children: [
|
|
27
|
-
/* @__PURE__ */ e(I, { placeholder:
|
|
27
|
+
/* @__PURE__ */ e(I, { placeholder: n }),
|
|
28
28
|
/* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(
|
|
29
29
|
c,
|
|
30
30
|
{
|
|
31
31
|
icon: "ChevronDown",
|
|
32
|
-
className: i({ [`${o}__trigger-icon-expanded`]:
|
|
32
|
+
className: i({ [`${o}__trigger-icon-expanded`]: f }),
|
|
33
33
|
height: "1rem",
|
|
34
34
|
width: "1rem"
|
|
35
35
|
}
|
|
@@ -37,19 +37,19 @@ const y = d.forwardRef(
|
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
|
-
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ t(
|
|
41
|
-
/* @__PURE__ */ e(
|
|
42
|
-
/* @__PURE__ */ e(
|
|
43
|
-
|
|
40
|
+
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ t(S, { className: `${o}__content`, position: "popper", children: [
|
|
41
|
+
/* @__PURE__ */ e(O, { className: `${o}__scroll-button__up`, children: /* @__PURE__ */ e(c, { icon: "ChevronDown" }) }),
|
|
42
|
+
/* @__PURE__ */ e(P, { className: `${o}__viewport`, children: a.map((r) => /* @__PURE__ */ e(
|
|
43
|
+
d,
|
|
44
44
|
{
|
|
45
45
|
value: r.value,
|
|
46
|
-
disabled: r.value ===
|
|
46
|
+
disabled: r.value === n,
|
|
47
47
|
className: o,
|
|
48
48
|
children: r.label
|
|
49
49
|
},
|
|
50
50
|
r.value
|
|
51
51
|
)) }),
|
|
52
|
-
/* @__PURE__ */ e(
|
|
52
|
+
/* @__PURE__ */ e(R, { className: `${o}__scroll-button`, children: /* @__PURE__ */ e(c, { icon: "ChevronDown" }) })
|
|
53
53
|
] }) })
|
|
54
54
|
]
|
|
55
55
|
}
|
|
@@ -57,10 +57,10 @@ const y = d.forwardRef(
|
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
y.displayName = "Dropdown";
|
|
60
|
-
const
|
|
61
|
-
({ children:
|
|
60
|
+
const d = p(
|
|
61
|
+
({ children: a, className: n, ...l }, s) => /* @__PURE__ */ e(V, { className: `${n}__item`, ...l, ref: s, children: /* @__PURE__ */ e(j, { children: a }) })
|
|
62
62
|
);
|
|
63
|
-
|
|
63
|
+
d.displayName = "DropdownSelectItem";
|
|
64
64
|
export {
|
|
65
65
|
y as default
|
|
66
66
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpacingTokens } from '../../utils';
|
|
2
|
-
export interface GridProps<
|
|
2
|
+
export interface GridProps<GridElementType = HTMLElement> extends React.HTMLAttributes<GridElementType> {
|
|
3
3
|
/**
|
|
4
4
|
* A Grid must have children
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@ export interface GridProps<ElementType = HTMLElement> extends React.HTMLAttribut
|
|
|
7
7
|
/**
|
|
8
8
|
* Optional element to render as the top-level component e.g. 'div', 'span', CustomComponent, etc. Defaults to 'section'.
|
|
9
9
|
*/
|
|
10
|
-
element?: React.ElementType
|
|
10
|
+
element?: React.ElementType;
|
|
11
11
|
/**
|
|
12
12
|
* The gap between the rows in the grid. Defaults to 'md'.
|
|
13
13
|
*/
|
|
@@ -26,5 +26,8 @@ export interface GridProps<ElementType = HTMLElement> extends React.HTMLAttribut
|
|
|
26
26
|
*
|
|
27
27
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-layouts-grid--overview)
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
type GridComponent = <T extends HTMLElement = HTMLElement>(props: GridProps<T> & {
|
|
30
|
+
ref?: React.Ref<T>;
|
|
31
|
+
}) => React.ReactElement | null;
|
|
32
|
+
declare const Grid: GridComponent;
|
|
30
33
|
export default Grid;
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import l from "../../node_modules/classnames/index.js";
|
|
3
|
-
import { getCommonProps as
|
|
3
|
+
import { getCommonProps as p, SpacingTokens as m } from "../../utils/index.js";
|
|
4
4
|
import { determineGridClassName as f } from "./utils.js";
|
|
5
|
-
|
|
5
|
+
import { forwardRef as G } from "react";
|
|
6
|
+
const N = ({
|
|
6
7
|
children: o,
|
|
7
|
-
className:
|
|
8
|
-
element:
|
|
9
|
-
columnGap: a =
|
|
10
|
-
rowGap: t =
|
|
11
|
-
...
|
|
12
|
-
}) {
|
|
13
|
-
const { className:
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
8
|
+
className: r,
|
|
9
|
+
element: s = "section",
|
|
10
|
+
columnGap: a = m.md,
|
|
11
|
+
rowGap: t = m.lg,
|
|
12
|
+
...e
|
|
13
|
+
}, n) => {
|
|
14
|
+
const { className: i, ...c } = p(e, "Grid");
|
|
15
|
+
return /* @__PURE__ */ d(
|
|
16
|
+
s,
|
|
16
17
|
{
|
|
17
|
-
...
|
|
18
|
-
className: l(f(
|
|
19
|
-
...
|
|
18
|
+
...c,
|
|
19
|
+
className: l(f(i, a, t), r),
|
|
20
|
+
...e,
|
|
21
|
+
ref: n,
|
|
20
22
|
children: o
|
|
21
23
|
}
|
|
22
24
|
);
|
|
23
|
-
}
|
|
25
|
+
}, g = G(N);
|
|
26
|
+
g.displayName = "Grid";
|
|
24
27
|
export {
|
|
25
|
-
|
|
26
|
-
C as default
|
|
28
|
+
g as default
|
|
27
29
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { GridItemAlign } from './types';
|
|
3
2
|
export interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
3
|
/**
|
|
@@ -27,5 +26,5 @@ export interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
27
26
|
*
|
|
28
27
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-layouts-griditem--overview)
|
|
29
28
|
*/
|
|
30
|
-
declare const GridItem: (
|
|
29
|
+
declare const GridItem: import('react').ForwardRefExoticComponent<GridItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
31
30
|
export default GridItem;
|
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as l } from "react";
|
|
1
|
+
import { jsx as G } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N, useMemo as l } from "react";
|
|
3
3
|
import { getCommonProps as b } from "../../utils/index.js";
|
|
4
4
|
import j from "../../node_modules/classnames/index.js";
|
|
5
|
-
import { determineColumnSpanClassName as v, validateColumnSpans as
|
|
6
|
-
import { GridItemAlign as
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
i,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
5
|
+
import { determineColumnSpanClassName as v, validateColumnSpans as P } from "./gridItemUtils.js";
|
|
6
|
+
import { GridItemAlign as S } from "./types.js";
|
|
7
|
+
const O = N(
|
|
8
|
+
({
|
|
9
|
+
children: p,
|
|
10
|
+
xs: r = 2,
|
|
11
|
+
sm: m = 2,
|
|
12
|
+
md: t = 6,
|
|
13
|
+
lg: o = 12,
|
|
14
|
+
align: s = S.center,
|
|
15
|
+
element: c = "div",
|
|
16
|
+
className: a,
|
|
17
|
+
...n
|
|
18
|
+
}, d) => {
|
|
19
|
+
const { className: i, ...f } = b(n, "GridItem"), e = l(() => ({ xs: r, sm: m, md: t, lg: o }), [r, m, t, o]), u = l(() => [
|
|
20
|
+
i,
|
|
21
|
+
// figure out the class names for each breakpoint
|
|
22
|
+
Object.entries(e).map(
|
|
23
|
+
([C, I]) => v(C, I, s)
|
|
24
|
+
),
|
|
25
|
+
a
|
|
26
|
+
], [s, e, i, a]);
|
|
27
|
+
return P(Object.values(e)) ? /* @__PURE__ */ G(c, { ref: d, ...f, className: j(u), ...n, children: p }) : null;
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
O.displayName = "GridItem";
|
|
28
31
|
export {
|
|
29
|
-
|
|
32
|
+
O as default
|
|
30
33
|
};
|
|
@@ -2,7 +2,7 @@ import { GridItemProps } from './GridItem';
|
|
|
2
2
|
import { GridItemAlign } from './types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<GridItemProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
export declare const Playground: {
|
|
@@ -25,5 +25,5 @@ export interface LinkProps extends ComponentProps<'a'> {
|
|
|
25
25
|
*
|
|
26
26
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-links-link--overview)
|
|
27
27
|
*/
|
|
28
|
-
declare const Link: (
|
|
28
|
+
declare const Link: import('react').ForwardRefExoticComponent<Omit<LinkProps, "ref"> & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
29
29
|
export default Link;
|
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import p from "../../node_modules/classnames/index.js";
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
className: n,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
);
|
|
27
|
-
};
|
|
3
|
+
import { getCommonProps as k } from "../../utils/index.js";
|
|
4
|
+
import { forwardRef as L } from "react";
|
|
5
|
+
import { getLinkVariantClassName as N, isLinkExternal as x } from "./utils.js";
|
|
6
|
+
import { LinkVariants as d } from "./types.js";
|
|
7
|
+
import g from "../Text/Text.js";
|
|
8
|
+
const C = L(
|
|
9
|
+
({ children: m, className: n, element: r = "a", variant: o = d.link, href: a, ...s }, t) => {
|
|
10
|
+
const { className: i, ...l } = k(s, "Link"), c = p(i, N(o), n), f = x(a);
|
|
11
|
+
return /* @__PURE__ */ e(
|
|
12
|
+
r,
|
|
13
|
+
{
|
|
14
|
+
ref: t,
|
|
15
|
+
...l,
|
|
16
|
+
href: a,
|
|
17
|
+
className: c,
|
|
18
|
+
...f && r === "a" ? { rel: "noopener noreferrer", target: "_blank" } : {},
|
|
19
|
+
...s,
|
|
20
|
+
children: /* @__PURE__ */ e(g, { variant: o, children: m })
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
C.displayName = "Link";
|
|
28
26
|
export {
|
|
29
|
-
|
|
27
|
+
C as default
|
|
30
28
|
};
|
|
@@ -2,7 +2,7 @@ import { LinkProps } from './Link';
|
|
|
2
2
|
import { LinkVariants } from './types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<Omit<LinkProps, "ref"> & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
interface StoryProps extends LinkProps {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { TextVariants as l } from "../Text/types.js";
|
|
2
|
-
import "
|
|
3
|
-
import "../../utils/index.js";
|
|
4
|
-
import "../../node_modules/classnames/index.js";
|
|
2
|
+
import "../Text/Text.js";
|
|
5
3
|
var o = ((e) => (e[e.email = l.email] = "email", e[e.snwHeaderLink = l.snwHeaderLink] = "snwHeaderLink", e[e.snwFlyoutLink = l.snwFlyoutLink] = "snwFlyoutLink", e[e.link = l.link] = "link", e))(o || {});
|
|
6
4
|
export {
|
|
7
5
|
o as LinkVariants
|
|
@@ -15,5 +15,5 @@ export interface LinkBlockProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
15
15
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-links-linkblock--overview)
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
18
|
-
declare const LinkBlock: (
|
|
18
|
+
declare const LinkBlock: import('react').ForwardRefExoticComponent<LinkBlockProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
19
19
|
export default LinkBlock;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { getCommonProps as
|
|
1
|
+
import { jsxs as l, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import d from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { getCommonProps as f } from "../../utils/index.js";
|
|
4
4
|
import k from "../Link/Link.js";
|
|
5
5
|
import { LinkVariants as p } from "../Link/types.js";
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
}
|
|
6
|
+
import L from "../Text/Text.js";
|
|
7
|
+
import { forwardRef as N } from "react";
|
|
8
|
+
const x = N(
|
|
9
|
+
({ linkProps: o, description: i, className: r, ...m }, e) => {
|
|
10
|
+
const { className: s, ...t } = f(m, "LinkBlock"), n = d(s, r), c = o.element ?? k;
|
|
11
|
+
return /* @__PURE__ */ l("div", { ...t, className: n, ...m, ref: e, children: [
|
|
12
|
+
/* @__PURE__ */ a(c, { ...o, "data-testid": `${t["data-testid"]}-link`, variant: p.link }),
|
|
13
|
+
/* @__PURE__ */ a(L, { className: `${s}__description`, children: i })
|
|
14
|
+
] });
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
x.displayName = "LinkBlock";
|
|
14
18
|
export {
|
|
15
|
-
|
|
19
|
+
x as default
|
|
16
20
|
};
|
|
@@ -2,7 +2,7 @@ import { LinkProps } from '../Link/Link';
|
|
|
2
2
|
import { LinkBlockProps } from './LinkBlock';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<LinkBlockProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
export declare const Playground: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { default as LinkBlock, LinkBlockProps } from '../LinkBlock/LinkBlock';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
2
|
import { GridProps } from '../Grid/Grid';
|
|
4
3
|
export interface LinkListProps extends GridProps<HTMLUListElement> {
|
|
5
4
|
/** These children should be an array of LinkBlock components */
|
|
@@ -14,5 +13,5 @@ export interface LinkListProps extends GridProps<HTMLUListElement> {
|
|
|
14
13
|
*
|
|
15
14
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-links-linklist--overview)
|
|
16
15
|
*/
|
|
17
|
-
declare const LinkList: (
|
|
16
|
+
declare const LinkList: import('react').ForwardRefExoticComponent<LinkListProps & import('react').RefAttributes<HTMLUListElement>>;
|
|
18
17
|
export default LinkList;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import { forwardRef as l } from "react";
|
|
3
|
+
import { getCommonProps as n } from "../../utils/index.js";
|
|
4
|
+
import p from "../../node_modules/classnames/index.js";
|
|
5
|
+
import f from "../Grid/Grid.js";
|
|
6
|
+
const c = l(({ children: o, className: i, ...s }, a) => {
|
|
7
|
+
const { className: r, ...t } = n(s, "LinkList");
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
9
|
+
f,
|
|
10
|
+
{
|
|
11
|
+
...t,
|
|
12
|
+
className: p(r, i),
|
|
13
|
+
element: "ul",
|
|
14
|
+
role: "list",
|
|
15
|
+
...s,
|
|
16
|
+
ref: a,
|
|
17
|
+
children: o.map((m) => /* @__PURE__ */ e("li", { className: `${r}--item`, children: m }, m?.props?.linkProps?.href))
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
c.displayName = "LinkList";
|
|
9
22
|
export {
|
|
10
|
-
|
|
23
|
+
c as default
|
|
11
24
|
};
|
|
@@ -2,13 +2,13 @@ import { LinkListProps } from './LinkList';
|
|
|
2
2
|
import { LinkBlockProps } from '../LinkBlock/LinkBlock';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<LinkListProps & import('react').RefAttributes<HTMLUListElement>>;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
export declare const Playground: {
|
|
9
9
|
({ children }: LinkListProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
args: {
|
|
11
|
-
children: import('react').ReactElement<LinkBlockProps, (
|
|
11
|
+
children: import('react').ReactElement<LinkBlockProps, import('react').ForwardRefExoticComponent<LinkBlockProps & import('react').RefAttributes<HTMLDivElement>>>[];
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
export declare const IrregularLinkList: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button/Button';
|
|
3
3
|
export type PaginationOptionValue = string | number;
|
|
4
4
|
export interface PaginationOption {
|
|
@@ -67,5 +67,5 @@ export interface PaginationProps extends Omit<ComponentProps<'div'>, 'onChange'>
|
|
|
67
67
|
*
|
|
68
68
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-pagination--overview)
|
|
69
69
|
*/
|
|
70
|
-
declare const Pagination: (
|
|
70
|
+
declare const Pagination: import('react').ForwardRefExoticComponent<Omit<PaginationProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
71
71
|
export default Pagination;
|