@phillips/seldon 1.140.0 → 1.142.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/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +48 -44
- package/dist/index.d.ts +1 -0
- package/dist/index.js +175 -172
- package/dist/patterns/AccountPageHeader/AccountPageHeader.d.ts +41 -0
- package/dist/patterns/AccountPageHeader/AccountPageHeader.js +42 -0
- package/dist/patterns/AccountPageHeader/AccountPageHeader.stories.d.ts +34 -0
- package/dist/patterns/AccountPageHeader/AccountPageHeader.test.d.ts +1 -0
- package/dist/patterns/AccountPageHeader/index.d.ts +1 -0
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/IconButton/_iconButton.scss +2 -2
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +4 -0
- package/dist/scss/patterns/AccountPageHeader/_accountPageHeader.scss +33 -0
- package/dist/site-furniture/Header/Header.stories.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +12 -8
- package/dist/utils/utils.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,58 +1,62 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { getCommonProps as $, findChildrenOfType as b, px as f } from "../../../utils/index.js";
|
|
1
|
+
import { jsx as n, Fragment as _, jsxs as f } from "react/jsx-runtime";
|
|
3
2
|
import k from "../../../node_modules/classnames/index.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import v from "../../Text/Text.js";
|
|
7
|
-
import O from "../NavigationList/NavigationList.js";
|
|
8
|
-
import S from "../../Accordion/Accordion.js";
|
|
9
|
-
import y from "../../Accordion/AccordionItem.js";
|
|
3
|
+
import i, { forwardRef as $, useState as I } from "react";
|
|
4
|
+
import M from "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js";
|
|
10
5
|
import { SSRMediaQuery as g } from "../../../providers/SeldonProvider/utils.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
import { HeaderContext as v } from "../../../site-furniture/Header/Header.js";
|
|
7
|
+
import { getCommonProps as O, findChildrenOfType as S, focusElementById as y, px as h } from "../../../utils/index.js";
|
|
8
|
+
import E from "../../Accordion/Accordion.js";
|
|
9
|
+
import R from "../../Accordion/AccordionItem.js";
|
|
10
|
+
import { AccordionItemVariant as w } from "../../Accordion/types.js";
|
|
11
|
+
import { TextVariants as C } from "../../Text/types.js";
|
|
12
|
+
import N from "../../Text/Text.js";
|
|
13
|
+
import L from "../NavigationList/NavigationList.js";
|
|
14
|
+
const A = ({ id: a, label: o, children: l }) => {
|
|
15
|
+
const { isMenuOpen: c } = i.useContext(v);
|
|
16
|
+
return /* @__PURE__ */ n(E, { children: /* @__PURE__ */ n(
|
|
17
|
+
R,
|
|
18
18
|
{
|
|
19
19
|
hasTransition: !0,
|
|
20
|
-
id: `accordion-item-${
|
|
21
|
-
label: /* @__PURE__ */
|
|
22
|
-
variant:
|
|
23
|
-
children:
|
|
20
|
+
id: `accordion-item-${a}`,
|
|
21
|
+
label: /* @__PURE__ */ n(N, { variant: C.snwHeaderLink, children: o }),
|
|
22
|
+
variant: w.lg,
|
|
23
|
+
children: l
|
|
24
24
|
},
|
|
25
25
|
`accordion-key-${o}`
|
|
26
|
-
) }, `accordion-key-${o}-${
|
|
27
|
-
},
|
|
28
|
-
({ id:
|
|
29
|
-
const { className:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
) }, `accordion-key-${o}-${c}`);
|
|
27
|
+
}, H = $(
|
|
28
|
+
({ id: a, label: o, children: l, className: c, onClick: b, ...x }, t) => {
|
|
29
|
+
const { className: m, ...u } = O({ id: a }, "NavigationItemTrigger"), [d, s] = I(!1), e = S(l, L), { closeMenu: p } = i.useContext(v), T = i.useCallback(() => {
|
|
30
|
+
s(!0), e && e[0]?.props?.id && y(e[0].props.id, !0);
|
|
31
|
+
const r = t && "current" in t ? t.current : null;
|
|
32
|
+
r && r.focus();
|
|
33
|
+
}, [e, t]);
|
|
34
|
+
return /* @__PURE__ */ n(_, { children: /* @__PURE__ */ f(M, { enabled: d, allowPinchZoom: !0, removeScrollBar: !1, children: [
|
|
35
|
+
/* @__PURE__ */ n(g.Media, { lessThan: "md", children: /* @__PURE__ */ n(A, { id: a, label: o, ...u, children: e ? i.cloneElement(e[0], {
|
|
36
|
+
className: `${m}__submenu--mobile`,
|
|
37
|
+
onClick: (r) => {
|
|
38
|
+
e[0].props?.onClick?.(r), s?.(!1), p?.();
|
|
35
39
|
}
|
|
36
40
|
}) : null }) }),
|
|
37
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ n(g.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ f(
|
|
38
42
|
"li",
|
|
39
43
|
{
|
|
40
|
-
...
|
|
41
|
-
ref:
|
|
42
|
-
"aria-expanded":
|
|
43
|
-
className: k(
|
|
44
|
-
[`${
|
|
44
|
+
...u,
|
|
45
|
+
ref: t,
|
|
46
|
+
"aria-expanded": d,
|
|
47
|
+
className: k(c, m, `${h}-nav__item`, {
|
|
48
|
+
[`${m}--hovered`]: d
|
|
45
49
|
}),
|
|
46
|
-
onClick:
|
|
47
|
-
onMouseOver:
|
|
48
|
-
onMouseOut: () =>
|
|
50
|
+
onClick: b,
|
|
51
|
+
onMouseOver: T,
|
|
52
|
+
onMouseOut: () => s(!1),
|
|
49
53
|
...x,
|
|
50
54
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
className: `${
|
|
54
|
-
onClick: (
|
|
55
|
-
|
|
55
|
+
/* @__PURE__ */ n("button", { className: `${h}-nav__item-trigger`, type: "button", children: /* @__PURE__ */ n(N, { variant: C.snwHeaderLink, children: o }) }),
|
|
56
|
+
e ? i.cloneElement(e[0], {
|
|
57
|
+
className: `${m}__submenu`,
|
|
58
|
+
onClick: (r) => {
|
|
59
|
+
e[0].props?.onClick?.(r), s?.(!1), p?.();
|
|
56
60
|
}
|
|
57
61
|
}) : null
|
|
58
62
|
]
|
|
@@ -61,7 +65,7 @@ const E = ({ id: n, label: o, children: m }) => {
|
|
|
61
65
|
] }) });
|
|
62
66
|
}
|
|
63
67
|
);
|
|
64
|
-
|
|
68
|
+
H.displayName = "NavigationItemTrigger";
|
|
65
69
|
export {
|
|
66
|
-
|
|
70
|
+
H as default
|
|
67
71
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export * from './components/FavoritingTileButton';
|
|
|
66
66
|
export * from './components/Filter';
|
|
67
67
|
export * from './components/Icon';
|
|
68
68
|
export * from './components/TextArea';
|
|
69
|
+
export * from './patterns/AccountPageHeader';
|
|
69
70
|
export * from './patterns/BidSnapshot';
|
|
70
71
|
export * from './patterns/FilterMenu';
|
|
71
72
|
export * from './patterns/ObjectTile';
|
package/dist/index.js
CHANGED
|
@@ -1,198 +1,201 @@
|
|
|
1
|
-
import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidation as l, encodeURLSearchParams as d, findChildrenExcludingTypes as m, findChildrenOfType as p,
|
|
2
|
-
import { default as
|
|
3
|
-
import { SSRMediaQuery as
|
|
4
|
-
import { usePendingState as
|
|
5
|
-
import { AuctionStatus as
|
|
6
|
-
import { default as
|
|
1
|
+
import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidation as l, encodeURLSearchParams as d, findChildrenExcludingTypes as m, findChildrenOfType as p, focusElementById as u, generatePaddingClassName as i, getCommonProps as n, noOp as x, px as g, useNormalizedInputProps as c } from "./utils/index.js";
|
|
2
|
+
import { default as C } from "./pages/Page.js";
|
|
3
|
+
import { SSRMediaQuery as B, ssrMediaQueryStyle as L } from "./providers/SeldonProvider/utils.js";
|
|
4
|
+
import { usePendingState as A } from "./utils/hooks.js";
|
|
5
|
+
import { AuctionStatus as V, LotStatus as b, SupportedLanguages as h } from "./types/commonTypes.js";
|
|
6
|
+
import { default as w } from "./components/Button/Button.js";
|
|
7
7
|
import { ButtonVariants as v } from "./components/Button/types.js";
|
|
8
8
|
import { default as D } from "./components/IconButton/IconButton.js";
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { AccordionItemVariant as
|
|
12
|
-
import { default as
|
|
9
|
+
import { default as M } from "./components/Accordion/Accordion.js";
|
|
10
|
+
import { default as E } from "./components/Accordion/AccordionItem.js";
|
|
11
|
+
import { AccordionItemVariant as G, AccordionVariants as O } from "./components/Accordion/types.js";
|
|
12
|
+
import { default as Q } from "./components/Breadcrumb/Breadcrumb.js";
|
|
13
13
|
import "react/jsx-runtime";
|
|
14
14
|
import "./node_modules/classnames/index.js";
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { HeightUnits as
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { Grid as
|
|
31
|
-
import { default as
|
|
32
|
-
import { GridItemAlign as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { LinkVariants as
|
|
36
|
-
import { default as
|
|
15
|
+
import { default as z } from "./components/Icon/Icon.js";
|
|
16
|
+
import { default as Y } from "./components/Carousel/Carousel.js";
|
|
17
|
+
import { default as q } from "./components/Carousel/CarouselArrows.js";
|
|
18
|
+
import { default as K } from "./components/Carousel/CarouselContent.js";
|
|
19
|
+
import { default as _ } from "./components/Carousel/CarouselItem.js";
|
|
20
|
+
import { default as ee } from "./components/Carousel/CarouselDots.js";
|
|
21
|
+
import { default as oe } from "./components/Collapsible/Collapsible.js";
|
|
22
|
+
import { default as ae } from "./components/Collapsible/CollapsibleContent.js";
|
|
23
|
+
import { default as se } from "./components/Collapsible/CollapsibleTrigger.js";
|
|
24
|
+
import { default as de } from "./components/ContentPeek/ContentPeek.js";
|
|
25
|
+
import { HeightUnits as pe } from "./components/ContentPeek/utils.js";
|
|
26
|
+
import { default as ie } from "./components/Detail/Detail.js";
|
|
27
|
+
import { default as xe } from "./components/Drawer/Drawer.js";
|
|
28
|
+
import { default as ce } from "./components/Dropdown/Dropdown.js";
|
|
29
|
+
import { default as Ce } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
30
|
+
import { Grid as Be } from "./components/Grid/Grid.js";
|
|
31
|
+
import { default as Pe } from "./components/GridItem/GridItem.js";
|
|
32
|
+
import { GridItemAlign as Ie } from "./components/GridItem/types.js";
|
|
33
|
+
import { default as be } from "./components/Input/Input.js";
|
|
34
|
+
import { default as ke } from "./components/Link/Link.js";
|
|
35
|
+
import { LinkVariants as ye } from "./components/Link/types.js";
|
|
36
|
+
import { default as He } from "./components/LinkBlock/LinkBlock.js";
|
|
37
37
|
import { default as Fe } from "./components/LinkList/LinkList.js";
|
|
38
|
-
import { default as
|
|
38
|
+
import { default as Ne } from "./components/Modal/Modal.js";
|
|
39
39
|
import { default as Ue } from "./components/Navigation/Navigation.js";
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { SelectVariants as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { Tag as
|
|
55
|
-
import { TextAlignments as
|
|
56
|
-
import { default as
|
|
57
|
-
import { TextSymbolVariants as
|
|
58
|
-
import { default as
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { DetailListAlignment as
|
|
62
|
-
import { default as
|
|
40
|
+
import { default as Oe } from "./components/Navigation/NavigationItem/NavigationItem.js";
|
|
41
|
+
import { default as Qe } from "./components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
|
|
42
|
+
import { default as ze } from "./components/Navigation/NavigationList/NavigationList.js";
|
|
43
|
+
import { default as Ye } from "./components/PageContentWrapper/PageContentWrapper.js";
|
|
44
|
+
import { default as qe } from "./components/Pagination/Pagination.js";
|
|
45
|
+
import { default as Ke } from "./components/PinchZoom/PinchZoom.js";
|
|
46
|
+
import { default as _e } from "./components/Row/Row.js";
|
|
47
|
+
import { default as et } from "./components/Search/Search.js";
|
|
48
|
+
import { default as ot } from "./components/SeldonImage/SeldonImage.js";
|
|
49
|
+
import { default as at } from "./components/Select/Select.js";
|
|
50
|
+
import { SelectVariants as st } from "./components/Select/types.js";
|
|
51
|
+
import { default as dt } from "./components/SplitPanel/SplitPanel.js";
|
|
52
|
+
import { default as pt } from "./components/Tabs/TabsContainer.js";
|
|
53
|
+
import { default as it } from "./components/Tabs/TabsContent.js";
|
|
54
|
+
import { Tag as xt, default as gt } from "./components/Tags/Tags.js";
|
|
55
|
+
import { TextAlignments as St, TextVariants as Ct } from "./components/Text/types.js";
|
|
56
|
+
import { default as Bt } from "./components/Text/Text.js";
|
|
57
|
+
import { TextSymbolVariants as Pt } from "./components/TextSymbol/types.js";
|
|
58
|
+
import { default as It } from "./components/TextSymbol/TextSymbol.js";
|
|
59
|
+
import { default as bt } from "./components/Video/Video.js";
|
|
60
|
+
import { default as kt } from "./patterns/DetailList/DetailList.js";
|
|
61
|
+
import { DetailListAlignment as yt } from "./patterns/DetailList/types.js";
|
|
62
|
+
import { default as Ht } from "./patterns/FavoritesCollectionTile/FavoritesCollectionTile.js";
|
|
63
63
|
import { default as Ft } from "./patterns/HeroBanner/HeroBanner.js";
|
|
64
|
-
import { default as
|
|
64
|
+
import { default as Nt } from "./patterns/LanguageSelector/LanguageSelector.js";
|
|
65
65
|
import { default as Ut } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
|
|
66
|
-
import { default as
|
|
67
|
-
import { default as
|
|
68
|
-
import { default as
|
|
69
|
-
import { SubscriptionState as
|
|
70
|
-
import { AuthState as
|
|
71
|
-
import { default as
|
|
72
|
-
import { default as
|
|
73
|
-
import { default as
|
|
74
|
-
import { SeldonProvider as
|
|
75
|
-
import { default as
|
|
76
|
-
import { default as
|
|
77
|
-
import { default as
|
|
78
|
-
import { default as
|
|
79
|
-
import { CountdownVariants as
|
|
80
|
-
import { default as
|
|
81
|
-
import { default as
|
|
82
|
-
import { default as
|
|
66
|
+
import { default as Ot } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
|
|
67
|
+
import { default as Qt } from "./patterns/Social/Social.js";
|
|
68
|
+
import { default as zt } from "./patterns/Subscribe/Subscribe.js";
|
|
69
|
+
import { SubscriptionState as Yt } from "./patterns/Subscribe/types.js";
|
|
70
|
+
import { AuthState as qt } from "./patterns/UserManagement/types.js";
|
|
71
|
+
import { default as Kt } from "./patterns/UserManagement/UserManagement.js";
|
|
72
|
+
import { default as _t } from "./patterns/ViewingsList/StatefulViewingsList.js";
|
|
73
|
+
import { default as eo } from "./patterns/ViewingsList/ViewingsList.js";
|
|
74
|
+
import { SeldonProvider as oo } from "./providers/SeldonProvider/SeldonProvider.js";
|
|
75
|
+
import { default as ao } from "./site-furniture/Footer/Footer.js";
|
|
76
|
+
import { default as so } from "./site-furniture/Header/Header.js";
|
|
77
|
+
import { default as mo } from "./components/Article/Article.js";
|
|
78
|
+
import { default as uo } from "./components/Countdown/Countdown.js";
|
|
79
|
+
import { CountdownVariants as no } from "./components/Countdown/types.js";
|
|
80
|
+
import { default as go } from "./components/Divider/Divider.js";
|
|
81
|
+
import { default as So } from "./components/FavoritingTileButton/FavoritingTileButton.js";
|
|
82
|
+
import { default as To } from "./components/Filter/Filter.js";
|
|
83
83
|
import { default as Lo } from "./components/Filter/FilterInput.js";
|
|
84
|
-
import { default as
|
|
85
|
-
import { default as
|
|
86
|
-
import { default as
|
|
87
|
-
import { default as
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import { default as
|
|
84
|
+
import { default as Ao } from "./components/Filter/FilterHeader.js";
|
|
85
|
+
import { default as Vo } from "./components/TextArea/TextArea.js";
|
|
86
|
+
import { default as ho } from "./patterns/AccountPageHeader/AccountPageHeader.js";
|
|
87
|
+
import { default as wo } from "./patterns/BidSnapshot/BidSnapshot.js";
|
|
88
|
+
import { default as vo } from "./patterns/BidSnapshot/BidMessage.js";
|
|
89
|
+
import { BidMessageVariants as Do, BidStatusEnum as Fo } from "./patterns/BidSnapshot/types.js";
|
|
90
|
+
import { default as No } from "./patterns/FilterMenu/FilterMenu.js";
|
|
91
|
+
import { default as Uo } from "./patterns/ObjectTile/ObjectTile.js";
|
|
91
92
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
vo as
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
93
|
+
M as Accordion,
|
|
94
|
+
E as AccordionItem,
|
|
95
|
+
G as AccordionItemVariant,
|
|
96
|
+
O as AccordionVariants,
|
|
97
|
+
ho as AccountPageHeader,
|
|
98
|
+
mo as Article,
|
|
99
|
+
V as AuctionStatus,
|
|
100
|
+
qt as AuthState,
|
|
101
|
+
vo as BidMessage,
|
|
102
|
+
Do as BidMessageVariants,
|
|
103
|
+
wo as BidSnapshot,
|
|
104
|
+
Fo as BidStatusEnum,
|
|
105
|
+
Q as Breadcrumb,
|
|
106
|
+
w as Button,
|
|
105
107
|
v as ButtonVariants,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
108
|
+
Y as Carousel,
|
|
109
|
+
q as CarouselArrows,
|
|
110
|
+
K as CarouselContent,
|
|
111
|
+
ee as CarouselDots,
|
|
112
|
+
_ as CarouselItem,
|
|
113
|
+
oe as Collapsible,
|
|
114
|
+
ae as CollapsibleContent,
|
|
115
|
+
se as CollapsibleTrigger,
|
|
116
|
+
de as ContentPeek,
|
|
117
|
+
pe as ContentPeekHeightUnits,
|
|
118
|
+
uo as Countdown,
|
|
119
|
+
no as CountdownVariants,
|
|
120
|
+
ie as Detail,
|
|
121
|
+
kt as DetailList,
|
|
122
|
+
yt as DetailListAlignment,
|
|
123
|
+
go as Divider,
|
|
124
|
+
xe as Drawer,
|
|
125
|
+
ce as Dropdown,
|
|
126
|
+
Ce as ErrorBoundary,
|
|
127
|
+
Ht as FavoritesCollectionTile,
|
|
128
|
+
So as FavoritingTileButton,
|
|
129
|
+
To as Filter,
|
|
130
|
+
Ao as FilterHeader,
|
|
129
131
|
Lo as FilterInput,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
No as FilterMenu,
|
|
133
|
+
ao as Footer,
|
|
134
|
+
Be as Grid,
|
|
135
|
+
Pe as GridItem,
|
|
136
|
+
Ie as GridItemAlign,
|
|
137
|
+
so as Header,
|
|
136
138
|
Ft as HeroBanner,
|
|
137
|
-
|
|
139
|
+
z as Icon,
|
|
138
140
|
D as IconButton,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
be as Input,
|
|
142
|
+
Nt as LanguageSelector,
|
|
143
|
+
ke as Link,
|
|
144
|
+
He as LinkBlock,
|
|
143
145
|
Fe as LinkList,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
146
|
+
ye as LinkVariants,
|
|
147
|
+
b as LotStatus,
|
|
148
|
+
Ne as Modal,
|
|
147
149
|
Ue as Navigation,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
Oe as NavigationItem,
|
|
151
|
+
Qe as NavigationItemTrigger,
|
|
152
|
+
ze as NavigationList,
|
|
153
|
+
Uo as ObjectTile,
|
|
152
154
|
a as PaddingTokens,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
155
|
+
C as Page,
|
|
156
|
+
Ye as PageContentWrapper,
|
|
157
|
+
qe as Pagination,
|
|
158
|
+
Ke as PinchZoom,
|
|
159
|
+
_e as Row,
|
|
160
|
+
B as SSRMediaQuery,
|
|
159
161
|
Ut as SaleHeaderBanner,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
Ot as SaleHeaderBrowseAuctions,
|
|
163
|
+
et as Search,
|
|
164
|
+
ot as SeldonImage,
|
|
165
|
+
oo as SeldonProvider,
|
|
166
|
+
at as Select,
|
|
167
|
+
st as SelectVariants,
|
|
168
|
+
Qt as Social,
|
|
167
169
|
f as SpacingTokens,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
170
|
+
dt as SplitPanel,
|
|
171
|
+
_t as StatefulViewingsList,
|
|
172
|
+
zt as Subscribe,
|
|
173
|
+
Yt as SubscriptionState,
|
|
174
|
+
h as SupportedLanguages,
|
|
175
|
+
pt as TabsContainer,
|
|
176
|
+
it as TabsContent,
|
|
177
|
+
xt as Tag,
|
|
178
|
+
gt as TagsList,
|
|
179
|
+
Bt as Text,
|
|
180
|
+
St as TextAlignments,
|
|
181
|
+
Vo as TextArea,
|
|
182
|
+
Pt as TextSymbolVariants,
|
|
183
|
+
It as TextSymbols,
|
|
184
|
+
Ct as TextVariants,
|
|
185
|
+
Kt as UserManagement,
|
|
186
|
+
bt as Video,
|
|
187
|
+
eo as ViewingsList,
|
|
186
188
|
s as defaultYear,
|
|
187
189
|
l as emailValidation,
|
|
188
190
|
d as encodeURLSearchParams,
|
|
189
191
|
m as findChildrenExcludingTypes,
|
|
190
192
|
p as findChildrenOfType,
|
|
191
|
-
u as
|
|
192
|
-
i as
|
|
193
|
-
n as
|
|
194
|
-
x as
|
|
193
|
+
u as focusElementById,
|
|
194
|
+
i as generatePaddingClassName,
|
|
195
|
+
n as getCommonProps,
|
|
196
|
+
x as noOp,
|
|
197
|
+
g as px,
|
|
195
198
|
L as ssrMediaQueryStyle,
|
|
196
|
-
|
|
197
|
-
|
|
199
|
+
c as useNormalizedInputProps,
|
|
200
|
+
A as usePendingState
|
|
198
201
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { IconName } from '../../components/Icon';
|
|
3
|
+
export interface AccountPageHeaderProps extends ComponentProps<'div'> {
|
|
4
|
+
/** The main title displayed at the top of the account page */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Optional subtitle text that appears below the main title */
|
|
7
|
+
subheader?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Array of action buttons to display in the header
|
|
10
|
+
* @property {string} [label] - Optional text to display on the button
|
|
11
|
+
* @property {string} ariaLabel - Accessible label for the button
|
|
12
|
+
* @property {IconName} icon - Icon to display on the button
|
|
13
|
+
* @property {() => void} onClick - Function to call when the button is clicked
|
|
14
|
+
* @property {boolean} [isPrimary] - When true, renders as a regular button; when false or undefined, renders as an icon button
|
|
15
|
+
*/
|
|
16
|
+
actionButtons?: Array<{
|
|
17
|
+
label?: string;
|
|
18
|
+
ariaLabel: string;
|
|
19
|
+
icon: IconName;
|
|
20
|
+
onClick: () => void;
|
|
21
|
+
isPrimary?: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
/** Optional text displayed above the title */
|
|
24
|
+
overline?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Show or hide the bottom divider
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
showDivider?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* ## Overview
|
|
33
|
+
*
|
|
34
|
+
* AccountPageHeader is the component that displays at the top of each page in the account section.
|
|
35
|
+
*
|
|
36
|
+
* [Figma Link, Click into the playground for more details](https://www.figma.com/design/rIefa3bRPyZbZmtyV9PSQv/My-Account?node-id=497-47896&m=dev)
|
|
37
|
+
*
|
|
38
|
+
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/patterns-accountpageheader--overview)
|
|
39
|
+
*/
|
|
40
|
+
declare const AccountPageHeader: import('react').ForwardRefExoticComponent<Omit<AccountPageHeaderProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
41
|
+
export default AccountPageHeader;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsxs as n, jsx as r, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as P } from "react";
|
|
3
|
+
import { getCommonProps as $ } from "../../utils/index.js";
|
|
4
|
+
import k from "../../node_modules/classnames/index.js";
|
|
5
|
+
import l from "../../components/Text/Text.js";
|
|
6
|
+
import { TextVariants as c } from "../../components/Text/types.js";
|
|
7
|
+
import y from "../../components/Divider/Divider.js";
|
|
8
|
+
import x from "../../components/Button/Button.js";
|
|
9
|
+
import { ButtonVariants as L } from "../../components/Button/types.js";
|
|
10
|
+
import m from "../../components/Icon/Icon.js";
|
|
11
|
+
import h from "../../components/IconButton/IconButton.js";
|
|
12
|
+
import { SSRMediaQuery as f } from "../../providers/SeldonProvider/utils.js";
|
|
13
|
+
const T = P(
|
|
14
|
+
({ className: _, title: v, subheader: t, actionButtons: o, overline: s, showDivider: N = !0, ...g }, u) => {
|
|
15
|
+
const { className: e, ...C } = $(g, "AccountPageHeader"), i = o?.find((a) => a.isPrimary), d = o?.filter((a) => !a.isPrimary), b = () => /* @__PURE__ */ n("div", { className: `${e}__button-wrapper`, children: [
|
|
16
|
+
d && /* @__PURE__ */ r(p, { children: d.map((a) => /* @__PURE__ */ r(h, { onClick: a.onClick, "aria-label": a.ariaLabel, children: /* @__PURE__ */ r(m, { icon: a.icon, "aria-label": a.ariaLabel, title: a.ariaLabel }) }, `icon-button-${a.icon}`)) }),
|
|
17
|
+
i && /* @__PURE__ */ n(p, { children: [
|
|
18
|
+
/* @__PURE__ */ r(f.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ n(x, { variant: L.secondary, onClick: i.onClick, children: [
|
|
19
|
+
/* @__PURE__ */ r(m, { icon: i.icon }),
|
|
20
|
+
" ",
|
|
21
|
+
i.label
|
|
22
|
+
] }) }),
|
|
23
|
+
/* @__PURE__ */ r(f.Media, { lessThan: "md", children: /* @__PURE__ */ r(h, { onClick: i.onClick, "aria-label": i.ariaLabel, children: /* @__PURE__ */ r(m, { icon: i.icon, title: i.ariaLabel }) }) })
|
|
24
|
+
] })
|
|
25
|
+
] });
|
|
26
|
+
return /* @__PURE__ */ n("div", { ...C, className: k(e, _), ref: u, children: [
|
|
27
|
+
/* @__PURE__ */ n("div", { className: `${e}__container`, children: [
|
|
28
|
+
s && /* @__PURE__ */ r(l, { variant: c.string2, className: `${e}__overline`, children: s }),
|
|
29
|
+
/* @__PURE__ */ n("div", { className: `${e}__header`, children: [
|
|
30
|
+
/* @__PURE__ */ r(l, { variant: c.title1, children: v }),
|
|
31
|
+
o && o.length > 0 && b()
|
|
32
|
+
] }),
|
|
33
|
+
t && /* @__PURE__ */ r(l, { variant: c.string2, className: `${e}__subheader`, children: t })
|
|
34
|
+
] }),
|
|
35
|
+
N && /* @__PURE__ */ r(y, { className: `${e}__divider` })
|
|
36
|
+
] });
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
T.displayName = "AccountPageHeader";
|
|
40
|
+
export {
|
|
41
|
+
T as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AccountPageHeaderProps } from './AccountPageHeader';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import('react').ForwardRefExoticComponent<Omit<AccountPageHeaderProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
+
args: {
|
|
6
|
+
showDivider: true;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export declare const Playground: {
|
|
11
|
+
(props: AccountPageHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
args: {
|
|
13
|
+
title: string;
|
|
14
|
+
subheader: string;
|
|
15
|
+
overline: string;
|
|
16
|
+
actionButtons: ({
|
|
17
|
+
label: string;
|
|
18
|
+
ariaLabel: string;
|
|
19
|
+
icon: string;
|
|
20
|
+
onClick: () => void;
|
|
21
|
+
isPrimary: boolean;
|
|
22
|
+
} | {
|
|
23
|
+
ariaLabel: string;
|
|
24
|
+
icon: string;
|
|
25
|
+
onClick: () => void;
|
|
26
|
+
label?: undefined;
|
|
27
|
+
isPrimary?: undefined;
|
|
28
|
+
})[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export declare const Details: () => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const Bids: () => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const FavoritesAndLists: () => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const List: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AccountPageHeader, type AccountPageHeaderProps } from './AccountPageHeader';
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
@use 'patterns/BidSnapshot/bidSnapshot';
|
|
62
62
|
@use 'patterns/FilterMenu/filterMenu';
|
|
63
63
|
@use 'patterns/DetailList/detailList';
|
|
64
|
+
@use 'patterns/AccountPageHeader/accountPageHeader';
|
|
64
65
|
@use 'patterns/FavoritesCollectionTile/favoritesCollectionTile';
|
|
65
66
|
|
|
66
67
|
// Site Furniture
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
&:focus-visible {
|
|
21
21
|
&:focus-visible {
|
|
22
22
|
outline: 0.5px solid $soft-black;
|
|
23
|
-
outline-offset:
|
|
23
|
+
outline-offset: 0;
|
|
24
24
|
|
|
25
25
|
svg {
|
|
26
26
|
fill: $pure-white;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
color: $pure-white;
|
|
50
50
|
|
|
51
51
|
path {
|
|
52
|
-
|
|
52
|
+
fill: $pure-white;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@use '../../allPartials' as *;
|
|
2
|
+
|
|
3
|
+
.#{$px}-account-page-header {
|
|
4
|
+
&__container {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: $spacing-xsm;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&__header {
|
|
12
|
+
align-items: center;
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: $spacing-md;
|
|
15
|
+
justify-content: space-between;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__overline {
|
|
19
|
+
color: $button-hover;
|
|
20
|
+
font-variation-settings: 'wght' 600;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__button-wrapper {
|
|
24
|
+
align-items: center;
|
|
25
|
+
display: flex;
|
|
26
|
+
gap: $spacing-sm;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__divider.seldon-divider {
|
|
31
|
+
margin: $spacing-md 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HeaderProps } from './Header';
|
|
2
|
-
import { AuthState } from '../../patterns/UserManagement/types';
|
|
3
1
|
import { default as React } from 'react';
|
|
2
|
+
import { AuthState } from '../../patterns/UserManagement/types';
|
|
3
|
+
import { HeaderProps } from './Header';
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: React.ForwardRefExoticComponent<Omit<HeaderProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -102,4 +102,5 @@ export declare const emailValidation: (email: string) => boolean;
|
|
|
102
102
|
export declare const findChildrenOfType: <ComponentProps>(children: React.ReactNode, componentType?: React.ElementType, inverse?: boolean) => React.ReactElement<ComponentProps, string | React.JSXElementConstructor<any>>[] | null;
|
|
103
103
|
export declare const findChildrenExcludingTypes: <ComponentProps>(children: React.ReactNode, excludedTypes: React.ElementType[]) => React.ReactElement<ComponentProps, string | React.JSXElementConstructor<any>>[] | null;
|
|
104
104
|
export declare const encodeURLSearchParams: (url: string) => string;
|
|
105
|
+
export declare const focusElementById: (elementId: string, focus: boolean) => void;
|
|
105
106
|
export {};
|
package/dist/utils/index.js
CHANGED
|
@@ -9,7 +9,7 @@ const s = "seldon", v = ({ id: e, ...r }, n) => {
|
|
|
9
9
|
className: `${s}-${t}`
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var f = /* @__PURE__ */ ((e) => (e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e.xxl = "xxl", e))(f || {}), x = /* @__PURE__ */ ((e) => (e.micro = "micro", e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e.xxl = "xxl", e))(x || {});
|
|
13
13
|
const C = () => {
|
|
14
14
|
};
|
|
15
15
|
function g({
|
|
@@ -33,7 +33,7 @@ function g({
|
|
|
33
33
|
};
|
|
34
34
|
return l.invalid && (l.validation = /* @__PURE__ */ d("div", { className: `${s}-input__validation ${s}-${o}-input--invalid`, id: l.invalidId, children: t })), l.warn && (l.validation = /* @__PURE__ */ d("div", { className: `${s}-input__validation ${s}-${o}-input--warn`, id: l.warnId, children: m })), l;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const y = (/* @__PURE__ */ new Date()).getFullYear(), w = (e, r = "end", n = "vertical") => `${s}-padding-${n}-${e}-${r}`, I = (e) => /(.+)@(.+){2,}\.(.+){2,}/i.test(e), h = (e, r, n = !1) => {
|
|
37
37
|
const t = c.Children.toArray(e).filter((a) => a && a.type === r && !n ? a : a && a.type !== r && n);
|
|
38
38
|
return t.length > 0 ? t : null;
|
|
39
39
|
}, N = (e, r) => {
|
|
@@ -45,16 +45,20 @@ const w = (/* @__PURE__ */ new Date()).getFullYear(), h = (e, r = "end", n = "ve
|
|
|
45
45
|
}, R = (e) => {
|
|
46
46
|
const r = e.split("?"), n = new URLSearchParams(r[1]), a = Array.from(n.entries()).map(([i, m]) => [i, encodeURIComponent(m)]).map(([i, m]) => `${i}=${m}`).join("&");
|
|
47
47
|
return `${r[0]}?${a}`;
|
|
48
|
+
}, b = (e, r) => {
|
|
49
|
+
const n = document.getElementById(e);
|
|
50
|
+
n && r ? n.focus() : n && n.blur();
|
|
48
51
|
};
|
|
49
52
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
f as PaddingTokens,
|
|
54
|
+
x as SpacingTokens,
|
|
55
|
+
y as defaultYear,
|
|
56
|
+
I as emailValidation,
|
|
54
57
|
R as encodeURLSearchParams,
|
|
55
58
|
N as findChildrenExcludingTypes,
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
h as findChildrenOfType,
|
|
60
|
+
b as focusElementById,
|
|
61
|
+
w as generatePaddingClassName,
|
|
58
62
|
v as getCommonProps,
|
|
59
63
|
C as noOp,
|
|
60
64
|
s as px,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|