@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,162 +1,165 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { TextVariants as
|
|
9
|
-
import
|
|
10
|
-
import { useOnClickOutside as
|
|
11
|
-
import { HeaderContext as
|
|
12
|
-
import { SearchButton as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (r.
|
|
39
|
-
|
|
40
|
-
|
|
1
|
+
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as j, useContext as D, useRef as p, useState as H, useEffect as O } from "react";
|
|
3
|
+
import { getCommonProps as A, px as F, encodeURLSearchParams as N } from "../../utils/index.js";
|
|
4
|
+
import f from "../../node_modules/classnames/index.js";
|
|
5
|
+
import K from "../Input/Input.js";
|
|
6
|
+
import M from "../Link/Link.js";
|
|
7
|
+
import U from "./SearchResults/SearchResults.js";
|
|
8
|
+
import { TextVariants as Z } from "../Text/types.js";
|
|
9
|
+
import q from "../Text/Text.js";
|
|
10
|
+
import { useOnClickOutside as z } from "../../node_modules/usehooks-ts/dist/index.js";
|
|
11
|
+
import { HeaderContext as B } from "../../site-furniture/Header/Header.js";
|
|
12
|
+
import { SearchButton as G } from "./SearchButton.js";
|
|
13
|
+
import J from "../../node_modules/react-remove-scroll/dist/es2015/Combination.js";
|
|
14
|
+
import Q from "../../node_modules/react-transition-group/esm/CSSTransition.js";
|
|
15
|
+
const W = j(
|
|
16
|
+
({
|
|
17
|
+
onSearch: S,
|
|
18
|
+
onCancel: _,
|
|
19
|
+
searchResults: R = [],
|
|
20
|
+
state: n = "idle",
|
|
21
|
+
defaultValue: w = "",
|
|
22
|
+
className: C,
|
|
23
|
+
placeholder: I = "",
|
|
24
|
+
searchButtonText: o = "Search",
|
|
25
|
+
loadingText: E = "Search In Progress...",
|
|
26
|
+
invalidText: b = "Invalid search",
|
|
27
|
+
getAllResultsText: P = (e) => `View all results for ${e}`,
|
|
28
|
+
getAllResultsLink: v = (e) => `/Search?Search=${e}`,
|
|
29
|
+
...x
|
|
30
|
+
}, k) => {
|
|
31
|
+
const { className: e, "data-testid": i, ...L } = A(x, "Search"), c = D(B), l = p(null), d = p(null), g = p(null), a = c.isSearchExpanded, s = l.current?.value, [T, m] = H(!0), y = S ? (r) => {
|
|
32
|
+
S(r.target.value);
|
|
33
|
+
} : void 0;
|
|
34
|
+
z(g, (r) => {
|
|
35
|
+
_?.(), h(!1), r.stopPropagation();
|
|
36
|
+
});
|
|
37
|
+
const $ = (r) => {
|
|
38
|
+
if (r.stopPropagation(), r.key === "Enter") {
|
|
39
|
+
if (r.preventDefault(), s && s.length > 2) {
|
|
40
|
+
const V = N(v(s));
|
|
41
|
+
m(!1), window.location.href = V;
|
|
42
|
+
}
|
|
43
|
+
r.currentTarget instanceof HTMLAnchorElement && (m(!1), r.currentTarget.click());
|
|
41
44
|
}
|
|
42
|
-
r.
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
45
|
+
r.key === "Escape" && (d.current?.reset(), c.setIsSearchExpanded(!1));
|
|
46
|
+
};
|
|
47
|
+
O(() => {
|
|
48
|
+
if (a) {
|
|
49
|
+
l.current?.focus();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
}, [a]);
|
|
53
|
+
const h = (r) => {
|
|
54
|
+
d.current?.reset(), c.setIsSearchExpanded(r);
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ t(J, { enabled: a, allowPinchZoom: !0, removeScrollBar: !1, children: /* @__PURE__ */ t("div", { className: `${e}__container`, ref: k, children: /* @__PURE__ */ u(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
className: `${e}__container__inner`,
|
|
60
|
+
ref: g,
|
|
61
|
+
onClick: (r) => {
|
|
62
|
+
a || (h(!0), r.stopPropagation());
|
|
63
|
+
},
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ t(q, { variant: Z.heading4, className: `${e}__container__inner__label`, children: o }),
|
|
66
|
+
/* @__PURE__ */ t(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
...L,
|
|
70
|
+
className: f(e, C, { [`${e}--active`]: a }),
|
|
71
|
+
"data-testid": i,
|
|
72
|
+
role: "search",
|
|
73
|
+
...x,
|
|
74
|
+
children: /* @__PURE__ */ u(
|
|
75
|
+
"form",
|
|
76
|
+
{
|
|
77
|
+
"data-testid": `${i}-form`,
|
|
78
|
+
className: f(`${e}__form`, {
|
|
79
|
+
[`${e}__form--active`]: a
|
|
80
|
+
}),
|
|
81
|
+
ref: d,
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ u(
|
|
84
|
+
"div",
|
|
85
|
+
{
|
|
86
|
+
className: f(`${e}__content-wrapper`, {
|
|
87
|
+
[`${e}__content-wrapper--active`]: a
|
|
88
|
+
}),
|
|
89
|
+
role: "combobox",
|
|
90
|
+
"aria-haspopup": "listbox",
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ t(
|
|
93
|
+
Q,
|
|
94
|
+
{
|
|
95
|
+
in: a,
|
|
96
|
+
classNames: `${F}-input`,
|
|
97
|
+
addEndListener: () => {
|
|
98
|
+
},
|
|
99
|
+
children: /* @__PURE__ */ t(
|
|
100
|
+
K,
|
|
101
|
+
{
|
|
102
|
+
"aria-hidden": !a,
|
|
103
|
+
className: `${e}__input`,
|
|
104
|
+
id: "search-input",
|
|
105
|
+
hideLabel: !0,
|
|
106
|
+
labelText: o,
|
|
107
|
+
placeholder: a ? I : "",
|
|
108
|
+
type: "text",
|
|
109
|
+
defaultValue: w,
|
|
110
|
+
invalid: n === "invalid",
|
|
111
|
+
invalidText: b,
|
|
112
|
+
onKeyDown: $,
|
|
113
|
+
onChange: y,
|
|
114
|
+
ref: l
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ t(
|
|
120
|
+
G,
|
|
121
|
+
{
|
|
122
|
+
className: e,
|
|
123
|
+
searchButtonText: o,
|
|
124
|
+
state: n,
|
|
125
|
+
testId: i,
|
|
126
|
+
isSearchExpanded: a,
|
|
127
|
+
setIsSearchExpanded: h,
|
|
128
|
+
onCancel: _
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
a && T && s && s.length > 2 ? /* @__PURE__ */ t(
|
|
135
|
+
U,
|
|
136
|
+
{
|
|
137
|
+
autoCompleteResults: R,
|
|
138
|
+
isLoading: n === "loading",
|
|
139
|
+
loadingText: E,
|
|
140
|
+
onKeyDown: $,
|
|
141
|
+
userInputValue: s,
|
|
142
|
+
closeSearch: m,
|
|
143
|
+
children: /* @__PURE__ */ t("li", { className: `${e}__result`, children: /* @__PURE__ */ t(
|
|
144
|
+
M,
|
|
120
145
|
{
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
state: o,
|
|
124
|
-
testId: c,
|
|
125
|
-
isSearchExpanded: a,
|
|
126
|
-
setIsSearchExpanded: h,
|
|
127
|
-
onCancel: S
|
|
146
|
+
href: ((r) => N(v(r)))(s),
|
|
147
|
+
children: /* @__PURE__ */ t("p", { children: P(s) })
|
|
128
148
|
}
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
O,
|
|
144
|
-
{
|
|
145
|
-
href: ((r) => $(v(r)))(s),
|
|
146
|
-
children: /* @__PURE__ */ t("p", { children: P(s) })
|
|
147
|
-
}
|
|
148
|
-
) }, "viewAllSearchResults")
|
|
149
|
-
}
|
|
150
|
-
) : null
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
)
|
|
156
|
-
]
|
|
157
|
-
}
|
|
158
|
-
) }) });
|
|
159
|
-
};
|
|
149
|
+
) }, "viewAllSearchResults")
|
|
150
|
+
}
|
|
151
|
+
) : null
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
) }) });
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
W.displayName = "Search";
|
|
160
163
|
export {
|
|
161
|
-
|
|
164
|
+
W as default
|
|
162
165
|
};
|
|
@@ -15,5 +15,5 @@ export interface SplitPanelProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
15
15
|
*
|
|
16
16
|
* [Figma Link](https://www.figma.com/file/Hp2FyltbOmRxTuw9kSwBAd/EPIC-About-Us?type=design&node-id=635-34713&mode=design&t=wKZW1vKP8WePUjrH-0)
|
|
17
17
|
*/
|
|
18
|
-
declare const SplitPanel: (
|
|
18
|
+
declare const SplitPanel: import('react').ForwardRefExoticComponent<SplitPanelProps & import('react').RefAttributes<HTMLElement>>;
|
|
19
19
|
export default SplitPanel;
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import i from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { forwardRef as p } from "react";
|
|
3
4
|
import { getCommonProps as c } from "../../utils/index.js";
|
|
4
|
-
const
|
|
5
|
-
children:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
21
|
-
};
|
|
5
|
+
const f = p(
|
|
6
|
+
({ children: s, className: m, element: a = "section", hasBorder: r = !0, ...e }, t) => {
|
|
7
|
+
const { className: o, ...l } = c(e, "SplitPanel");
|
|
8
|
+
return /* @__PURE__ */ n(
|
|
9
|
+
a,
|
|
10
|
+
{
|
|
11
|
+
...l,
|
|
12
|
+
className: i(o, m, { [`${o}--borderless`]: !r }),
|
|
13
|
+
ref: t,
|
|
14
|
+
...e,
|
|
15
|
+
children: s
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
f.displayName = "SplitPanel";
|
|
22
21
|
export {
|
|
23
|
-
|
|
22
|
+
f as default
|
|
24
23
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SplitPanelProps } from './SplitPanel';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: (
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<SplitPanelProps & import('react').RefAttributes<HTMLElement>>;
|
|
5
5
|
};
|
|
6
6
|
export default meta;
|
|
7
7
|
export declare const Playground: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
import { TextAlignments, TextVariants } from './types';
|
|
3
2
|
export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
3
|
/**
|
|
@@ -27,5 +26,5 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
27
26
|
*
|
|
28
27
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-text--overview)
|
|
29
28
|
*/
|
|
30
|
-
declare const Text: (
|
|
29
|
+
declare const Text: import('react').ForwardRefExoticComponent<TextProps & import('react').RefAttributes<HTMLElement>>;
|
|
31
30
|
export default Text;
|
|
@@ -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";
|
|
@@ -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>;
|