@phillips/seldon 1.171.0 → 1.172.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/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/Drawer/Drawer.d.ts +22 -3
- package/dist/components/Drawer/Drawer.js +80 -73
- package/dist/components/Drawer/Drawer.stories.d.ts +97 -2
- package/dist/components/Drawer/DrawerHeader.d.ts +12 -0
- package/dist/components/Drawer/DrawerHeader.js +34 -0
- package/dist/components/Drawer/DrawerHeader.test.d.ts +1 -0
- 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/FiltersInline/MainFilterDropdown.js +23 -22
- package/dist/patterns/FiltersInline/SubFilterDropdown.js +67 -66
- 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/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Drawer/_drawer.scss +43 -16
- package/dist/scss/components/Drawer/_drawerHeader.scss +45 -0
- package/dist/utils/testUtils.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { forwardRef as x } from "react";
|
|
3
|
+
import { getCommonProps as d, px as N } from "../../utils/index.js";
|
|
4
|
+
import { TextVariants as T } from "./types.js";
|
|
5
|
+
import { determineDefaultTextElement as C, determineTextClassName as u } from "./utils.js";
|
|
5
6
|
import r from "../../node_modules/classnames/index.js";
|
|
6
|
-
const
|
|
7
|
-
children: a,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
)
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
};
|
|
7
|
+
const $ = x(
|
|
8
|
+
({ children: a, className: n, element: l, variant: e = T.body2, align: m, isSkeletonLoading: p, ...o }, f) => {
|
|
9
|
+
const c = l || C(e), { className: t, ...i } = d(o, "Text");
|
|
10
|
+
return /* @__PURE__ */ s(
|
|
11
|
+
c,
|
|
12
|
+
{
|
|
13
|
+
...i,
|
|
14
|
+
className: r(t, n, u(e), {
|
|
15
|
+
[`${t}--${m}`]: !!m
|
|
16
|
+
}),
|
|
17
|
+
ref: f,
|
|
18
|
+
...o,
|
|
19
|
+
children: /* @__PURE__ */ s(
|
|
20
|
+
"span",
|
|
21
|
+
{
|
|
22
|
+
className: r({
|
|
23
|
+
[`${N}-skeleton`]: p
|
|
24
|
+
}),
|
|
25
|
+
children: a
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
$.displayName = "Text";
|
|
36
33
|
export {
|
|
37
|
-
|
|
34
|
+
$ as default
|
|
38
35
|
};
|
|
@@ -2,7 +2,7 @@ import { TextProps } from './Text';
|
|
|
2
2
|
import { TextAlignments, TextVariants } from './types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<TextProps & import('react').RefAttributes<HTMLElement>>;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
export declare const Playground: {
|
|
@@ -9,5 +9,5 @@ export interface TextSymbolProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
9
9
|
*/
|
|
10
10
|
variant?: TextSymbolVariants;
|
|
11
11
|
}
|
|
12
|
-
declare const TextSymbol: (
|
|
12
|
+
declare const TextSymbol: import('react').ForwardRefExoticComponent<TextSymbolProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
13
13
|
export default TextSymbol;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import i from "../../node_modules/classnames/index.js";
|
|
3
4
|
import { getCommonProps as c } from "../../utils/index.js";
|
|
4
|
-
import { TextSymbolVariants as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { TextSymbolVariants as f } from "./types.js";
|
|
6
|
+
const x = p(
|
|
7
|
+
({ symbols: e = [], variant: s = f.lotNumber, className: t, ...m }, l) => {
|
|
8
|
+
const { className: o, ...n } = c(m, "TextSymbol");
|
|
9
|
+
return /* @__PURE__ */ a(
|
|
10
|
+
"span",
|
|
11
|
+
{
|
|
12
|
+
...n,
|
|
13
|
+
className: i(o, t, `${o}--${s}`),
|
|
14
|
+
ref: l,
|
|
15
|
+
...m,
|
|
16
|
+
children: e.map((r) => /* @__PURE__ */ a("span", { children: r }, r))
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
x.displayName = "TextSymbol";
|
|
9
22
|
export {
|
|
10
|
-
|
|
23
|
+
x as default
|
|
11
24
|
};
|
|
@@ -2,7 +2,7 @@ import { TextSymbolProps } from './TextSymbol';
|
|
|
2
2
|
import { TextSymbolVariants } from './types';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<TextSymbolProps & import('react').RefAttributes<HTMLSpanElement>>;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
export declare const Playground: {
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import { default as ie } from "./components/Detail/Detail.js";
|
|
|
27
27
|
import { default as ne } from "./components/Drawer/Drawer.js";
|
|
28
28
|
import { default as ce } from "./components/Dropdown/Dropdown.js";
|
|
29
29
|
import { default as Ce } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
30
|
-
import {
|
|
30
|
+
import { default as Pe } from "./components/Grid/Grid.js";
|
|
31
31
|
import { default as Ae } from "./components/GridItem/GridItem.js";
|
|
32
32
|
import { GridItemAlign as Le } from "./components/GridItem/types.js";
|
|
33
33
|
import { default as be } from "./components/Input/Input.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as l, Fragment as A, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import N from "../../node_modules/classnames/index.js";
|
|
3
|
-
import
|
|
3
|
+
import g from "react";
|
|
4
4
|
import c from "../../components/Button/Button.js";
|
|
5
|
-
import { ButtonVariants as
|
|
5
|
+
import { ButtonVariants as x } from "../../components/Button/types.js";
|
|
6
6
|
import k from "../../components/Drawer/Drawer.js";
|
|
7
7
|
import B from "../../components/Filter/Filter.js";
|
|
8
8
|
import D from "../../components/Filter/FilterHeader.js";
|
|
@@ -12,7 +12,7 @@ import j from "../FilterMenu/FilterMenu.js";
|
|
|
12
12
|
import { FilterButton as H } from "./FilterButton.js";
|
|
13
13
|
import { FilterButtonIconType as I } from "./types.js";
|
|
14
14
|
import { countActiveFilters as O, getFilterButtonClickHandler as R, resetAllFilters as S } from "./utils.js";
|
|
15
|
-
const T =
|
|
15
|
+
const T = g.forwardRef(
|
|
16
16
|
({
|
|
17
17
|
className: f,
|
|
18
18
|
filterButtonLabel: n,
|
|
@@ -24,22 +24,22 @@ const T = x.forwardRef(
|
|
|
24
24
|
onClickClear: w,
|
|
25
25
|
resultsCount: F,
|
|
26
26
|
dropdownMenuTranslation: d,
|
|
27
|
-
ariaLabels:
|
|
27
|
+
ariaLabels: p = {},
|
|
28
28
|
id: h
|
|
29
29
|
}, _) => {
|
|
30
|
-
const
|
|
30
|
+
const s = i?.[0] ?? !1, { totalCount: y, filterCount: C } = O(m, n);
|
|
31
31
|
return /* @__PURE__ */ l(A, { children: [
|
|
32
32
|
/* @__PURE__ */ o(
|
|
33
33
|
H,
|
|
34
34
|
{
|
|
35
35
|
ref: _,
|
|
36
36
|
className: f,
|
|
37
|
-
isSelected:
|
|
37
|
+
isSelected: s,
|
|
38
38
|
count: C,
|
|
39
39
|
label: n,
|
|
40
40
|
totalCount: y,
|
|
41
41
|
id: h,
|
|
42
|
-
ariaLabel:
|
|
42
|
+
ariaLabel: p.button || `${n} button`,
|
|
43
43
|
onClick: R(i, a, 0),
|
|
44
44
|
isMobile: !1,
|
|
45
45
|
type: I.Filter
|
|
@@ -48,28 +48,29 @@ const T = x.forwardRef(
|
|
|
48
48
|
/* @__PURE__ */ l(
|
|
49
49
|
k,
|
|
50
50
|
{
|
|
51
|
-
isOpen:
|
|
51
|
+
isOpen: s,
|
|
52
52
|
drawerOpenSide: "left",
|
|
53
53
|
onClose: () => S(i, a),
|
|
54
54
|
className: `${t}-filter-drawer`,
|
|
55
|
-
"aria-label":
|
|
55
|
+
"aria-label": p.drawer || "Filter drawer",
|
|
56
|
+
paddingLevel: 0,
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */ o(j, { className: `${t}-filter-drawer-menu`, children: m?.map((
|
|
58
|
-
/* @__PURE__ */ o(D, { heading:
|
|
59
|
-
Array.from(
|
|
58
|
+
/* @__PURE__ */ o(j, { className: `${t}-filter-drawer-menu`, children: m?.map((e) => /* @__PURE__ */ l(B, { name: e.label, children: [
|
|
59
|
+
/* @__PURE__ */ o(D, { heading: e.label }),
|
|
60
|
+
Array.from(e.filterDimensions).map((r) => /* @__PURE__ */ o(
|
|
60
61
|
M,
|
|
61
62
|
{
|
|
62
|
-
id:
|
|
63
|
-
labelText:
|
|
64
|
-
onChange: ($) => u?.($,
|
|
65
|
-
type:
|
|
66
|
-
disabled:
|
|
67
|
-
name:
|
|
68
|
-
checked:
|
|
63
|
+
id: r.label,
|
|
64
|
+
labelText: r.label,
|
|
65
|
+
onChange: ($) => u?.($, e.buttonType),
|
|
66
|
+
type: e.type,
|
|
67
|
+
disabled: r?.disabled,
|
|
68
|
+
name: r.label,
|
|
69
|
+
checked: r.active
|
|
69
70
|
},
|
|
70
|
-
|
|
71
|
+
r.label
|
|
71
72
|
))
|
|
72
|
-
] },
|
|
73
|
+
] }, e.id)) }),
|
|
73
74
|
/* @__PURE__ */ l(
|
|
74
75
|
"div",
|
|
75
76
|
{
|
|
@@ -82,7 +83,7 @@ const T = x.forwardRef(
|
|
|
82
83
|
c,
|
|
83
84
|
{
|
|
84
85
|
className: `${t}-filter-dropdown-menu__button`,
|
|
85
|
-
variant:
|
|
86
|
+
variant: x.secondary,
|
|
86
87
|
onClick: () => w?.("all"),
|
|
87
88
|
children: d?.clearAll || "Clear all"
|
|
88
89
|
}
|
|
@@ -1,103 +1,104 @@
|
|
|
1
1
|
import { jsxs as g, Fragment as S, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Root as f, Trigger as
|
|
2
|
+
import { Root as f, Trigger as v, Portal as j, Content as P } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
3
3
|
import _ from "react";
|
|
4
4
|
import q from "../../components/Drawer/Drawer.js";
|
|
5
|
-
import { SSRMediaQuery as
|
|
5
|
+
import { SSRMediaQuery as O } from "../../providers/SeldonProvider/utils.js";
|
|
6
6
|
import { px as E } from "../../utils/index.js";
|
|
7
|
-
import { FilterButton as
|
|
7
|
+
import { FilterButton as C } from "./FilterButton.js";
|
|
8
8
|
import { FilterDropdownMenuDesktop as H } from "./FilterDropdownMenuDesktop.js";
|
|
9
9
|
import { FilterDropdownMenuMobile as N } from "./FilterDropdownMenuMobile.js";
|
|
10
10
|
import { FilterButtonType as Q } from "./types.js";
|
|
11
|
-
import { countActiveFilters as k, getFilterButtonClickHandler as
|
|
11
|
+
import { countActiveFilters as k, getFilterButtonClickHandler as l, getFilterButtonLabel as z } from "./utils.js";
|
|
12
12
|
const A = _.forwardRef(
|
|
13
13
|
({
|
|
14
14
|
filterId: e = 0,
|
|
15
|
-
className:
|
|
15
|
+
className: h,
|
|
16
16
|
filterButtonLabel: r,
|
|
17
|
-
buttonType:
|
|
17
|
+
buttonType: i,
|
|
18
18
|
handleClick: m,
|
|
19
19
|
filtersListState: a,
|
|
20
|
-
filters:
|
|
21
|
-
onSelectFilter:
|
|
22
|
-
onApplyFilter:
|
|
23
|
-
onClickClear:
|
|
24
|
-
resultsCount:
|
|
25
|
-
filterButtonLabelTranslated:
|
|
26
|
-
dropdownMenuTranslation:
|
|
27
|
-
ariaLabels:
|
|
20
|
+
filters: t,
|
|
21
|
+
onSelectFilter: w,
|
|
22
|
+
onApplyFilter: F,
|
|
23
|
+
onClickClear: $,
|
|
24
|
+
resultsCount: b,
|
|
25
|
+
filterButtonLabelTranslated: p,
|
|
26
|
+
dropdownMenuTranslation: x,
|
|
27
|
+
ariaLabels: n = {},
|
|
28
28
|
hideDesktopSortButton: R,
|
|
29
|
-
id:
|
|
30
|
-
},
|
|
31
|
-
const
|
|
32
|
-
return R &&
|
|
33
|
-
/* @__PURE__ */ g(
|
|
29
|
+
id: c
|
|
30
|
+
}, M) => {
|
|
31
|
+
const d = a?.[e] ?? !1, { totalCount: D, filterCount: s } = k(t, i), u = z(r, s, p || null);
|
|
32
|
+
return R && i === Q.Sort ? null : /* @__PURE__ */ g(S, { children: [
|
|
33
|
+
/* @__PURE__ */ g(O.Media, { lessThan: "md", children: [
|
|
34
34
|
/* @__PURE__ */ o(
|
|
35
|
-
|
|
35
|
+
C,
|
|
36
36
|
{
|
|
37
|
-
ref:
|
|
38
|
-
className:
|
|
39
|
-
isSelected:
|
|
37
|
+
ref: M,
|
|
38
|
+
className: h,
|
|
39
|
+
isSelected: d,
|
|
40
40
|
count: s,
|
|
41
41
|
label: u,
|
|
42
|
-
id:
|
|
43
|
-
totalCount:
|
|
44
|
-
ariaLabel:
|
|
45
|
-
onClick:
|
|
42
|
+
id: c,
|
|
43
|
+
totalCount: D,
|
|
44
|
+
ariaLabel: n.button || `${r} button`,
|
|
45
|
+
onClick: l(a, m, e),
|
|
46
46
|
isMobile: !0,
|
|
47
|
-
type:
|
|
47
|
+
type: i
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
50
|
/* @__PURE__ */ o(
|
|
51
51
|
q,
|
|
52
52
|
{
|
|
53
53
|
drawerOpenSide: "bottom",
|
|
54
|
-
isOpen:
|
|
55
|
-
onClose:
|
|
56
|
-
"aria-label":
|
|
54
|
+
isOpen: d,
|
|
55
|
+
onClose: l(a, m, e),
|
|
56
|
+
"aria-label": n.drawer || `${r} drawer`,
|
|
57
57
|
className: `${E}-filter-drawer-mobile`,
|
|
58
|
-
|
|
58
|
+
headerText: `${u} Filter`,
|
|
59
|
+
paddingLevel: 0,
|
|
59
60
|
children: /* @__PURE__ */ o(
|
|
60
61
|
N,
|
|
61
62
|
{
|
|
62
|
-
buttonType:
|
|
63
|
-
filters:
|
|
63
|
+
buttonType: i,
|
|
64
|
+
filters: t,
|
|
64
65
|
filterIndex: e,
|
|
65
|
-
onSelectFilter:
|
|
66
|
-
onApplyFilter:
|
|
67
|
-
onClickClear:
|
|
68
|
-
resultsCount:
|
|
69
|
-
ariaLabels:
|
|
66
|
+
onSelectFilter: w,
|
|
67
|
+
onApplyFilter: F,
|
|
68
|
+
onClickClear: $,
|
|
69
|
+
resultsCount: b,
|
|
70
|
+
ariaLabels: n?.ariaLabel,
|
|
70
71
|
filterButtonLabel: r,
|
|
71
|
-
filterButtonLabelTranslated:
|
|
72
|
-
dropdownMenuTranslation:
|
|
72
|
+
filterButtonLabelTranslated: p,
|
|
73
|
+
dropdownMenuTranslation: x
|
|
73
74
|
}
|
|
74
75
|
)
|
|
75
76
|
}
|
|
76
77
|
)
|
|
77
78
|
] }),
|
|
78
|
-
/* @__PURE__ */ o(
|
|
79
|
+
/* @__PURE__ */ o(O.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ g(
|
|
79
80
|
f,
|
|
80
81
|
{
|
|
81
|
-
open:
|
|
82
|
-
onOpenChange:
|
|
82
|
+
open: d,
|
|
83
|
+
onOpenChange: l(a, m, e),
|
|
83
84
|
children: [
|
|
84
|
-
/* @__PURE__ */ o(
|
|
85
|
-
|
|
85
|
+
/* @__PURE__ */ o(v, { asChild: !0, children: /* @__PURE__ */ o(
|
|
86
|
+
C,
|
|
86
87
|
{
|
|
87
|
-
ref:
|
|
88
|
-
className:
|
|
89
|
-
isSelected:
|
|
88
|
+
ref: M,
|
|
89
|
+
className: h,
|
|
90
|
+
isSelected: d,
|
|
90
91
|
count: s,
|
|
91
92
|
label: u,
|
|
92
|
-
totalCount:
|
|
93
|
-
id:
|
|
94
|
-
ariaLabel:
|
|
95
|
-
onClick:
|
|
93
|
+
totalCount: D,
|
|
94
|
+
id: c,
|
|
95
|
+
ariaLabel: n.ariaLabel || `${r} button`,
|
|
96
|
+
onClick: l(a, m, e),
|
|
96
97
|
isMobile: !1,
|
|
97
|
-
type:
|
|
98
|
+
type: i
|
|
98
99
|
}
|
|
99
100
|
) }),
|
|
100
|
-
/* @__PURE__ */ o(
|
|
101
|
+
/* @__PURE__ */ o(j, { children: /* @__PURE__ */ o(
|
|
101
102
|
P,
|
|
102
103
|
{
|
|
103
104
|
avoidCollisions: !0,
|
|
@@ -105,28 +106,28 @@ const A = _.forwardRef(
|
|
|
105
106
|
sideOffset: 5,
|
|
106
107
|
align: "start",
|
|
107
108
|
alignOffset: 5,
|
|
108
|
-
"aria-label":
|
|
109
|
+
"aria-label": n.ariaLabel || `${r} dropdown`,
|
|
109
110
|
children: /* @__PURE__ */ o(
|
|
110
111
|
H,
|
|
111
112
|
{
|
|
112
|
-
buttonType:
|
|
113
|
-
filters:
|
|
113
|
+
buttonType: i,
|
|
114
|
+
filters: t,
|
|
114
115
|
filterIndex: e,
|
|
115
|
-
onSelectFilter:
|
|
116
|
-
onApplyFilter:
|
|
117
|
-
onClickClear:
|
|
118
|
-
resultsCount:
|
|
119
|
-
ariaLabels:
|
|
116
|
+
onSelectFilter: w,
|
|
117
|
+
onApplyFilter: F,
|
|
118
|
+
onClickClear: $,
|
|
119
|
+
resultsCount: b,
|
|
120
|
+
ariaLabels: n?.ariaLabel,
|
|
120
121
|
filterButtonLabel: r,
|
|
121
|
-
filterButtonLabelTranslated:
|
|
122
|
-
dropdownMenuTranslation:
|
|
122
|
+
filterButtonLabelTranslated: p,
|
|
123
|
+
dropdownMenuTranslation: x
|
|
123
124
|
}
|
|
124
125
|
)
|
|
125
126
|
}
|
|
126
127
|
) })
|
|
127
128
|
]
|
|
128
129
|
},
|
|
129
|
-
`${
|
|
130
|
+
`${c}-${r}-button`
|
|
130
131
|
) })
|
|
131
132
|
] });
|
|
132
133
|
}
|
|
@@ -38,5 +38,5 @@ export interface HeroBannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
38
38
|
*
|
|
39
39
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-herobanner--overview)
|
|
40
40
|
*/
|
|
41
|
-
declare const HeroBanner: (
|
|
41
|
+
declare const HeroBanner: import('react').ForwardRefExoticComponent<HeroBannerProps & import('react').RefAttributes<HTMLElement>>;
|
|
42
42
|
export default HeroBanner;
|
|
@@ -1,38 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as u } from "react";
|
|
3
|
+
import { getCommonProps as H } from "../../utils/index.js";
|
|
4
|
+
import N from "../../node_modules/classnames/index.js";
|
|
4
5
|
import { TextVariants as c } from "../../components/Text/types.js";
|
|
5
6
|
import i from "../../components/Text/Text.js";
|
|
6
|
-
const
|
|
7
|
-
prehead: e,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
s ? /* @__PURE__ */ n("p", { className: `${r}__after-head`, children: s }) : null
|
|
32
|
-
] })
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
};
|
|
7
|
+
const _ = u(
|
|
8
|
+
({ prehead: e, date: a, headerText: t, subHeadText: l, association: s, background: p, className: d, ...o }, f) => {
|
|
9
|
+
const { className: n, ...h } = H(o, "HeroBanner");
|
|
10
|
+
return /* @__PURE__ */ r(
|
|
11
|
+
"header",
|
|
12
|
+
{
|
|
13
|
+
...h,
|
|
14
|
+
className: N(n, d),
|
|
15
|
+
style: { "--background": p },
|
|
16
|
+
ref: f,
|
|
17
|
+
...o,
|
|
18
|
+
children: /* @__PURE__ */ m("span", { className: `${n}__content-wrapper`, children: [
|
|
19
|
+
e || a ? /* @__PURE__ */ m("p", { className: `${n}__pre-head`, children: [
|
|
20
|
+
e ? /* @__PURE__ */ r("span", { children: e }) : null,
|
|
21
|
+
a ? /* @__PURE__ */ r("span", { children: a }) : null
|
|
22
|
+
] }) : null,
|
|
23
|
+
/* @__PURE__ */ r(i, { variant: c.snwHeadingHero1, children: t }),
|
|
24
|
+
l ? /* @__PURE__ */ r(i, { variant: c.snwHeadingHero2, children: l }) : null,
|
|
25
|
+
s ? /* @__PURE__ */ r("p", { className: `${n}__after-head`, children: s }) : null
|
|
26
|
+
] })
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
_.displayName = "HeroBanner";
|
|
36
32
|
export {
|
|
37
|
-
|
|
33
|
+
_ as default
|
|
38
34
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { HeroBannerProps } from './HeroBanner';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: import('react').ForwardRefExoticComponent<HeroBannerProps & import('react').RefAttributes<HTMLElement>>;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
type Story = StoryObj<typeof meta>;
|