@phillips/seldon 1.145.0 → 1.145.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.
@@ -4,7 +4,7 @@ export interface AccountPageHeaderProps extends ComponentProps<'div'> {
4
4
  /** The main title displayed at the top of the account page */
5
5
  title: string;
6
6
  /** Optional subtitle text that appears below the main title */
7
- subheader?: string;
7
+ subtitle?: string;
8
8
  /**
9
9
  * Array of action buttons to display in the header
10
10
  * @property {string} [label] - Optional text to display on the button
@@ -17,7 +17,7 @@ export interface AccountPageHeaderProps extends ComponentProps<'div'> {
17
17
  label?: string;
18
18
  ariaLabel: string;
19
19
  icon: IconName;
20
- onClick: () => void;
20
+ onClick: (e?: React.SyntheticEvent) => void;
21
21
  isPrimary?: boolean;
22
22
  }>;
23
23
  /** Optional text displayed above the title */
@@ -1,6 +1,6 @@
1
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";
2
+ import { forwardRef as b } from "react";
3
+ import { getCommonProps as P } from "../../utils/index.js";
4
4
  import k from "../../node_modules/classnames/index.js";
5
5
  import l from "../../components/Text/Text.js";
6
6
  import { TextVariants as c } from "../../components/Text/types.js";
@@ -8,31 +8,31 @@ import y from "../../components/Divider/Divider.js";
8
8
  import x from "../../components/Button/Button.js";
9
9
  import { ButtonVariants as L } from "../../components/Button/types.js";
10
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 }),
11
+ import f from "../../components/IconButton/IconButton.js";
12
+ import { SSRMediaQuery as h } from "../../providers/SeldonProvider/utils.js";
13
+ const T = b(
14
+ ({ className: _, title: N, subtitle: t, actionButtons: o, overline: s, showDivider: v = !0, ...g }, u) => {
15
+ const { className: i, ...C } = P(g, "AccountPageHeader"), e = o?.find((a) => a.isPrimary), d = o?.filter((a) => !a.isPrimary), $ = () => /* @__PURE__ */ n("div", { className: `${i}__button-wrapper`, children: [
16
+ d && /* @__PURE__ */ r(p, { children: d.map((a) => /* @__PURE__ */ r(f, { 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
+ e && /* @__PURE__ */ n(p, { children: [
18
+ /* @__PURE__ */ r(h.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ n(x, { variant: L.secondary, onClick: e.onClick, children: [
19
+ /* @__PURE__ */ r(m, { icon: e.icon }),
20
20
  " ",
21
- i.label
21
+ e.label
22
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 }) }) })
23
+ /* @__PURE__ */ r(h.Media, { lessThan: "md", children: /* @__PURE__ */ r(f, { onClick: e.onClick, "aria-label": e.ariaLabel, children: /* @__PURE__ */ r(m, { icon: e.icon, title: e.ariaLabel }) }) })
24
24
  ] })
25
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()
26
+ return /* @__PURE__ */ n("div", { ...C, className: k(i, _), ref: u, children: [
27
+ /* @__PURE__ */ n("div", { className: `${i}__container`, children: [
28
+ s && /* @__PURE__ */ r(l, { variant: c.string2, className: `${i}__overline`, children: s }),
29
+ /* @__PURE__ */ n("div", { className: `${i}__title-wrapper`, children: [
30
+ /* @__PURE__ */ r(l, { variant: c.title1, className: `${i}__title`, children: N }),
31
+ o && o.length > 0 && $()
32
32
  ] }),
33
- t && /* @__PURE__ */ r(l, { variant: c.string2, className: `${e}__subheader`, children: t })
33
+ t && /* @__PURE__ */ r(l, { variant: c.string2, className: `${i}__subtitle`, children: t })
34
34
  ] }),
35
- N && /* @__PURE__ */ r(y, { className: `${e}__divider` })
35
+ v && /* @__PURE__ */ r(y, { className: `${i}__divider` })
36
36
  ] });
37
37
  }
38
38
  );
@@ -11,7 +11,7 @@ export declare const Playground: {
11
11
  (props: AccountPageHeaderProps): import("react/jsx-runtime").JSX.Element;
12
12
  args: {
13
13
  title: string;
14
- subheader: string;
14
+ subtitle: string;
15
15
  overline: string;
16
16
  actionButtons: ({
17
17
  label: string;
@@ -8,7 +8,12 @@
8
8
  width: 100%;
9
9
  }
10
10
 
11
- &__header {
11
+ &__title {
12
+ // To help center the title, accounts for the extra space inside the span below the text
13
+ margin-top: $spacing-micro;
14
+ }
15
+
16
+ &__title-wrapper {
12
17
  align-items: center;
13
18
  display: flex;
14
19
  gap: $spacing-md;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.145.0",
3
+ "version": "1.145.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"