@phillips/seldon 1.140.0 → 1.141.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/index.d.ts +1 -0
- package/dist/index.js +33 -31
- 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/patterns/AccountPageHeader/_accountPageHeader.scss +33 -0
- package/package.json +1 -1
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,12 +1,12 @@
|
|
|
1
1
|
import { PaddingTokens as a, SpacingTokens as f, defaultYear as s, emailValidation as l, encodeURLSearchParams as d, findChildrenExcludingTypes as m, findChildrenOfType as p, generatePaddingClassName as u, getCommonProps as i, noOp as n, px as x, useNormalizedInputProps as g } from "./utils/index.js";
|
|
2
2
|
import { default as S } from "./pages/Page.js";
|
|
3
3
|
import { SSRMediaQuery as T, ssrMediaQueryStyle as L } from "./providers/SeldonProvider/utils.js";
|
|
4
|
-
import { usePendingState as
|
|
4
|
+
import { usePendingState as A } from "./utils/hooks.js";
|
|
5
5
|
import { AuctionStatus as I, LotStatus as V, SupportedLanguages as b } from "./types/commonTypes.js";
|
|
6
6
|
import { default as k } from "./components/Button/Button.js";
|
|
7
7
|
import { ButtonVariants as v } from "./components/Button/types.js";
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
8
|
+
import { default as H } from "./components/IconButton/IconButton.js";
|
|
9
|
+
import { default as F } from "./components/Accordion/Accordion.js";
|
|
10
10
|
import { default as N } from "./components/Accordion/AccordionItem.js";
|
|
11
11
|
import { AccordionItemVariant as E, AccordionVariants as G } from "./components/Accordion/types.js";
|
|
12
12
|
import { default as R } from "./components/Breadcrumb/Breadcrumb.js";
|
|
@@ -28,13 +28,13 @@ import { default as ne } from "./components/Drawer/Drawer.js";
|
|
|
28
28
|
import { default as ge } from "./components/Dropdown/Dropdown.js";
|
|
29
29
|
import { default as Se } from "./components/ErrorBoundary/ErrorBoundary.js";
|
|
30
30
|
import { Grid as Te } from "./components/Grid/Grid.js";
|
|
31
|
-
import { default as
|
|
32
|
-
import { GridItemAlign as
|
|
31
|
+
import { default as Pe } from "./components/GridItem/GridItem.js";
|
|
32
|
+
import { GridItemAlign as Be } from "./components/GridItem/types.js";
|
|
33
33
|
import { default as Ve } from "./components/Input/Input.js";
|
|
34
34
|
import { default as he } from "./components/Link/Link.js";
|
|
35
35
|
import { LinkVariants as we } from "./components/Link/types.js";
|
|
36
36
|
import { default as ye } from "./components/LinkBlock/LinkBlock.js";
|
|
37
|
-
import { default as
|
|
37
|
+
import { default as De } from "./components/LinkList/LinkList.js";
|
|
38
38
|
import { default as Me } from "./components/Modal/Modal.js";
|
|
39
39
|
import { default as Ue } from "./components/Navigation/Navigation.js";
|
|
40
40
|
import { default as Ge } from "./components/Navigation/NavigationItem/NavigationItem.js";
|
|
@@ -54,13 +54,13 @@ import { default as ut } from "./components/Tabs/TabsContent.js";
|
|
|
54
54
|
import { Tag as nt, default as xt } from "./components/Tags/Tags.js";
|
|
55
55
|
import { TextAlignments as ct, TextVariants as St } from "./components/Text/types.js";
|
|
56
56
|
import { default as Tt } from "./components/Text/Text.js";
|
|
57
|
-
import { TextSymbolVariants as
|
|
58
|
-
import { default as
|
|
57
|
+
import { TextSymbolVariants as Pt } from "./components/TextSymbol/types.js";
|
|
58
|
+
import { default as Bt } from "./components/TextSymbol/TextSymbol.js";
|
|
59
59
|
import { default as Vt } from "./components/Video/Video.js";
|
|
60
60
|
import { default as ht } from "./patterns/DetailList/DetailList.js";
|
|
61
61
|
import { DetailListAlignment as wt } from "./patterns/DetailList/types.js";
|
|
62
62
|
import { default as yt } from "./patterns/FavoritesCollectionTile/FavoritesCollectionTile.js";
|
|
63
|
-
import { default as
|
|
63
|
+
import { default as Dt } from "./patterns/HeroBanner/HeroBanner.js";
|
|
64
64
|
import { default as Mt } from "./patterns/LanguageSelector/LanguageSelector.js";
|
|
65
65
|
import { default as Ut } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
|
|
66
66
|
import { default as Gt } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
|
|
@@ -81,25 +81,27 @@ import { default as xo } from "./components/Divider/Divider.js";
|
|
|
81
81
|
import { default as co } from "./components/FavoritingTileButton/FavoritingTileButton.js";
|
|
82
82
|
import { default as Co } from "./components/Filter/Filter.js";
|
|
83
83
|
import { default as Lo } from "./components/Filter/FilterInput.js";
|
|
84
|
-
import { default as
|
|
84
|
+
import { default as Ao } from "./components/Filter/FilterHeader.js";
|
|
85
85
|
import { default as Io } from "./components/TextArea/TextArea.js";
|
|
86
|
-
import { default as bo } from "./patterns/
|
|
87
|
-
import { default as ko } from "./patterns/BidSnapshot/
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import { default as Mo } from "./patterns/
|
|
86
|
+
import { default as bo } from "./patterns/AccountPageHeader/AccountPageHeader.js";
|
|
87
|
+
import { default as ko } from "./patterns/BidSnapshot/BidSnapshot.js";
|
|
88
|
+
import { default as vo } from "./patterns/BidSnapshot/BidMessage.js";
|
|
89
|
+
import { BidMessageVariants as Ho, BidStatusEnum as Do } from "./patterns/BidSnapshot/types.js";
|
|
90
|
+
import { default as Mo } from "./patterns/FilterMenu/FilterMenu.js";
|
|
91
|
+
import { default as Uo } from "./patterns/ObjectTile/ObjectTile.js";
|
|
91
92
|
export {
|
|
92
|
-
|
|
93
|
+
F as Accordion,
|
|
93
94
|
N as AccordionItem,
|
|
94
95
|
E as AccordionItemVariant,
|
|
95
96
|
G as AccordionVariants,
|
|
97
|
+
bo as AccountPageHeader,
|
|
96
98
|
lo as Article,
|
|
97
99
|
I as AuctionStatus,
|
|
98
100
|
Zt as AuthState,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
vo as BidMessage,
|
|
102
|
+
Ho as BidMessageVariants,
|
|
103
|
+
ko as BidSnapshot,
|
|
104
|
+
Do as BidStatusEnum,
|
|
103
105
|
R as Breadcrumb,
|
|
104
106
|
k as Button,
|
|
105
107
|
v as ButtonVariants,
|
|
@@ -125,22 +127,22 @@ export {
|
|
|
125
127
|
yt as FavoritesCollectionTile,
|
|
126
128
|
co as FavoritingTileButton,
|
|
127
129
|
Co as Filter,
|
|
128
|
-
|
|
130
|
+
Ao as FilterHeader,
|
|
129
131
|
Lo as FilterInput,
|
|
130
|
-
|
|
132
|
+
Mo as FilterMenu,
|
|
131
133
|
ro as Footer,
|
|
132
134
|
Te as Grid,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
Pe as GridItem,
|
|
136
|
+
Be as GridItemAlign,
|
|
135
137
|
fo as Header,
|
|
136
|
-
|
|
138
|
+
Dt as HeroBanner,
|
|
137
139
|
j as Icon,
|
|
138
|
-
|
|
140
|
+
H as IconButton,
|
|
139
141
|
Ve as Input,
|
|
140
142
|
Mt as LanguageSelector,
|
|
141
143
|
he as Link,
|
|
142
144
|
ye as LinkBlock,
|
|
143
|
-
|
|
145
|
+
De as LinkList,
|
|
144
146
|
we as LinkVariants,
|
|
145
147
|
V as LotStatus,
|
|
146
148
|
Me as Modal,
|
|
@@ -148,7 +150,7 @@ export {
|
|
|
148
150
|
Ge as NavigationItem,
|
|
149
151
|
Re as NavigationItemTrigger,
|
|
150
152
|
je as NavigationList,
|
|
151
|
-
|
|
153
|
+
Uo as ObjectTile,
|
|
152
154
|
a as PaddingTokens,
|
|
153
155
|
S as Page,
|
|
154
156
|
We as PageContentWrapper,
|
|
@@ -177,8 +179,8 @@ export {
|
|
|
177
179
|
Tt as Text,
|
|
178
180
|
ct as TextAlignments,
|
|
179
181
|
Io as TextArea,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
+
Pt as TextSymbolVariants,
|
|
183
|
+
Bt as TextSymbols,
|
|
182
184
|
St as TextVariants,
|
|
183
185
|
Jt as UserManagement,
|
|
184
186
|
Vt as Video,
|
|
@@ -194,5 +196,5 @@ export {
|
|
|
194
196
|
x as px,
|
|
195
197
|
L as ssrMediaQueryStyle,
|
|
196
198
|
g as useNormalizedInputProps,
|
|
197
|
-
|
|
199
|
+
A as usePendingState
|
|
198
200
|
};
|
|
@@ -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
|
+
}
|