@phillips/seldon 1.77.1 → 1.77.3

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.
@@ -1,112 +1,119 @@
1
- import { jsxs as $, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as h, jsx as t } from "react/jsx-runtime";
2
2
  import { getCommonProps as f } from "../../utils/index.js";
3
3
  import g from "../../assets/plus.svg.js";
4
4
  import v from "../../assets/minus.svg.js";
5
- import I from "../../assets/lock.svg.js";
6
- import a from "../../node_modules/classnames/index.js";
7
- import { Item as _, Trigger as x, Content as C } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
8
- import { AccordionItemVariant as h } from "./types.js";
5
+ import _ from "../../assets/lock.svg.js";
6
+ import l from "../../node_modules/classnames/index.js";
7
+ import { Item as I, Trigger as x, Content as A } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
8
+ import { AccordionItemVariant as $ } from "./types.js";
9
9
  import { getIconClasses as u } from "./utils.js";
10
- const A = ({
10
+ const k = ({
11
11
  children: n,
12
- className: e,
12
+ className: r,
13
13
  baseClassName: o,
14
- disable: s,
15
- isLargeVariation: r,
16
- id: c
14
+ disable: d,
15
+ isLargeVariation: c,
16
+ id: e
17
17
  }) => {
18
- const i = s, l = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
19
- I,
18
+ const s = d, a = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
19
+ _,
20
20
  {
21
- className: u(o, r, "lock"),
22
- "data-testid": `${c}-lockedIcon`,
21
+ className: u(o, c, "lock"),
22
+ "data-testid": `${e}-lockedIcon`,
23
23
  "aria-hidden": !0
24
24
  }
25
25
  ) }), p = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
26
26
  g,
27
27
  {
28
- className: u(o, r, "plus"),
29
- "data-testid": `${c}-plusIcon`,
28
+ className: u(o, c, "plus"),
29
+ "data-testid": `${e}-plusIcon`,
30
30
  "aria-hidden": !0
31
31
  }
32
- ) }), d = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
32
+ ) }), i = /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(
33
33
  v,
34
34
  {
35
- className: u(o, r, "minus"),
36
- "data-testid": `${c}-minusIcon`,
35
+ className: u(o, c, "minus"),
36
+ "data-testid": `${e}-minusIcon`,
37
37
  "aria-hidden": !0
38
38
  }
39
39
  ) });
40
40
  return /* @__PURE__ */ t(
41
41
  x,
42
42
  {
43
- "data-disabled": s,
43
+ "data-disabled": d,
44
44
  asChild: !0,
45
- className: a(o, { [`${o}--hoverable`]: !s }, e),
46
- children: /* @__PURE__ */ $("div", { "data-testid": `${c}-trigger`, children: [
47
- /* @__PURE__ */ t("div", { className: a(`${o}__text`, { [`${o}__text--lg`]: r }), children: n }),
48
- i && l,
49
- !i && p,
50
- !i && d
45
+ className: l(
46
+ o,
47
+ { [`${o}--large`]: c },
48
+ { [`${o}--hoverable`]: !d },
49
+ r
50
+ ),
51
+ children: /* @__PURE__ */ h("div", { "data-testid": `${e}-trigger`, children: [
52
+ /* @__PURE__ */ t("div", { className: l(`${o}__text`, { [`${o}__text--lg`]: c }), children: n }),
53
+ s && a,
54
+ !s && p,
55
+ !s && i
51
56
  ] })
52
57
  }
53
58
  );
54
- }, N = ({
59
+ }, C = ({
55
60
  children: n,
56
- baseClassName: e,
61
+ baseClassName: r,
57
62
  disable: o,
58
- hasTransition: s,
59
- isLargeVariation: r,
60
- className: c
61
- }) => o && n ? /* @__PURE__ */ t("div", { children: n }) : /* @__PURE__ */ t(
62
- C,
63
+ hasTransition: d,
64
+ isLargeVariation: c,
65
+ className: e
66
+ }) => o && n ? /* @__PURE__ */ t("div", { className: `${r}__content--locked`, children: n }) : /* @__PURE__ */ t(
67
+ A,
63
68
  {
64
69
  asChild: !0,
65
- className: a(
66
- `${e}__content`,
67
- { [`${e}__content--lg`]: r },
68
- { [`${e}--transition`]: s },
69
- c
70
+ className: l(
71
+ `${r}__content`,
72
+ { [`${r}__content--lg`]: c },
73
+ { [`${r}--transition`]: d },
74
+ e
70
75
  ),
71
76
  children: n
72
77
  }
73
- ), q = ({
78
+ ), y = ({
74
79
  isLocked: n = !1,
75
- variant: e = h.sm,
80
+ variant: r = $.sm,
76
81
  id: o,
77
- label: s,
78
- isLastItem: r,
79
- hasTransition: c = !1,
80
- children: i,
81
- ...l
82
+ label: d,
83
+ isLastItem: c,
84
+ hasTransition: e = !1,
85
+ children: s,
86
+ ...a
82
87
  }) => {
83
- const { className: p } = f({ id: o }, "Accordion"), d = e === h.lg, m = `${p}-item`;
84
- return /* @__PURE__ */ $(
85
- _,
88
+ const { className: p } = f({ id: o }, "Accordion"), i = r === $.lg, m = `${p}-item`;
89
+ return /* @__PURE__ */ h(
90
+ I,
86
91
  {
87
92
  disabled: n,
88
93
  value: o,
89
- className: a(m, { [`${m}__border-bottom`]: !r }),
90
- ...l,
94
+ className: l(m, {
95
+ [`${m}__border-bottom`]: !c
96
+ }),
97
+ ...a,
91
98
  children: [
92
99
  /* @__PURE__ */ t(
93
- A,
100
+ k,
94
101
  {
95
102
  disable: n,
96
- isLargeVariation: d,
103
+ isLargeVariation: i,
97
104
  id: o,
98
105
  baseClassName: `${m}-label`,
99
- children: s
106
+ children: d
100
107
  }
101
108
  ),
102
109
  /* @__PURE__ */ t(
103
- N,
110
+ C,
104
111
  {
105
112
  disable: n,
106
- hasTransition: c,
107
- isLargeVariation: d,
113
+ hasTransition: e,
114
+ isLargeVariation: i,
108
115
  baseClassName: m,
109
- children: /* @__PURE__ */ t("div", { className: "radix-accordion-content", children: i })
116
+ children: /* @__PURE__ */ t("div", { className: "radix-accordion-content", children: s })
110
117
  }
111
118
  )
112
119
  ]
@@ -114,5 +121,5 @@ const A = ({
114
121
  );
115
122
  };
116
123
  export {
117
- q as default
124
+ y as default
118
125
  };
@@ -1,44 +1,46 @@
1
- import { jsxs as d, Fragment as T, jsx as e } from "react/jsx-runtime";
2
- import { getCommonProps as _, findChildrenOfType as b, px as c } from "../../../utils/index.js";
1
+ import { jsxs as c, Fragment as T, jsx as e } from "react/jsx-runtime";
2
+ import { getCommonProps as _, findChildrenOfType as b, px as d } from "../../../utils/index.js";
3
3
  import x from "../../../node_modules/classnames/index.js";
4
- import l, { forwardRef as $, useState as I } from "react";
5
- import { TextVariants as p } from "../../Text/types.js";
4
+ import l, { forwardRef as I, useState as $ } from "react";
5
+ import { TextVariants as u } from "../../Text/types.js";
6
6
  import f from "../../Text/Text.js";
7
7
  import M from "../NavigationList/NavigationList.js";
8
8
  import O from "../../Accordion/Accordion.js";
9
9
  import y from "../../Accordion/AccordionItem.js";
10
- import { SSRMediaQuery as u } from "../../../providers/SeldonProvider/utils.js";
11
- const S = ({ id: i, label: r, children: t }) => /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
10
+ import { SSRMediaQuery as p } from "../../../providers/SeldonProvider/utils.js";
11
+ import { AccordionItemVariant as S } from "../../Accordion/types.js";
12
+ const C = ({ id: i, label: r, children: t }) => /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
12
13
  y,
13
14
  {
14
15
  hasTransition: !0,
15
16
  id: `accordion-item-${i}`,
16
- label: /* @__PURE__ */ e(f, { variant: p.snwHeaderLink, children: r }),
17
+ label: /* @__PURE__ */ e(f, { variant: u.snwHeaderLink, children: r }),
18
+ variant: S.lg,
17
19
  children: t
18
20
  },
19
21
  `accordion-key-${r}`
20
- ) }), C = $(
21
- ({ id: i, label: r, children: t, className: g, onClick: h, ...v }, N) => {
22
- const { className: n, ...a } = _({ id: i }, "NavigationItemTrigger"), [m, s] = I(!1), o = b(t, M);
23
- return /* @__PURE__ */ d(T, { children: [
24
- /* @__PURE__ */ e(u.Media, { lessThan: "md", children: /* @__PURE__ */ e(S, { id: i, label: r, ...a, children: o ? l.cloneElement(o[0], {
22
+ ) }), E = I(
23
+ ({ id: i, label: r, children: t, className: g, onClick: v, ...h }, N) => {
24
+ const { className: n, ...a } = _({ id: i }, "NavigationItemTrigger"), [m, s] = $(!1), o = b(t, M);
25
+ return /* @__PURE__ */ c(T, { children: [
26
+ /* @__PURE__ */ e(p.Media, { lessThan: "md", children: /* @__PURE__ */ e(C, { id: i, label: r, ...a, children: o ? l.cloneElement(o[0], {
25
27
  className: `${n}__submenu--mobile`
26
28
  }) : void 0 }) }),
27
- /* @__PURE__ */ e(u.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ d(
29
+ /* @__PURE__ */ e(p.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ c(
28
30
  "li",
29
31
  {
30
32
  ...a,
31
33
  ref: N,
32
34
  "aria-expanded": m,
33
- className: x(g, n, `${c}-nav__item`, {
35
+ className: x(g, n, `${d}-nav__item`, {
34
36
  [`${n}--hovered`]: m
35
37
  }),
36
- onClick: h,
38
+ onClick: v,
37
39
  onMouseOver: () => s(!0),
38
40
  onMouseOut: () => s(!1),
39
- ...v,
41
+ ...h,
40
42
  children: [
41
- /* @__PURE__ */ e("button", { className: `${c}-nav__item-trigger`, type: "button", children: /* @__PURE__ */ e(f, { variant: p.snwHeaderLink, children: r }) }),
43
+ /* @__PURE__ */ e("button", { className: `${d}-nav__item-trigger`, type: "button", children: /* @__PURE__ */ e(f, { variant: u.snwHeaderLink, children: r }) }),
42
44
  o ? l.cloneElement(o[0], { className: `${n}__submenu` }) : void 0
43
45
  ]
44
46
  }
@@ -46,7 +48,7 @@ const S = ({ id: i, label: r, children: t }) => /* @__PURE__ */ e(O, { children:
46
48
  ] });
47
49
  }
48
50
  );
49
- C.displayName = "NavigationItemTrigger";
51
+ E.displayName = "NavigationItemTrigger";
50
52
  export {
51
- C as default
53
+ E as default
52
54
  };
@@ -1,78 +1,82 @@
1
- import { jsxs as O, jsx as n } from "react/jsx-runtime";
2
- import u from "../../node_modules/classnames/index.js";
3
- import { getCommonProps as P, px as i } from "../../utils/index.js";
4
- import S from "../Select/Select.js";
1
+ import { jsxs as O, jsx as i } from "react/jsx-runtime";
2
+ import p from "../../node_modules/classnames/index.js";
3
+ import { getCommonProps as w, px as r } from "../../utils/index.js";
4
+ import V from "../Select/Select.js";
5
5
  import f from "../../assets/chevronRight.svg.js";
6
- import g from "../IconButton/IconButton.js";
6
+ import h from "../IconButton/IconButton.js";
7
7
  import { ButtonVariants as x } from "../Button/types.js";
8
- import { determineOptionValue as r, findOptionFromSelectString as v } from "./utils.js";
9
- const R = ({
8
+ import { determineOptionValue as o, findOptionFromSelectString as j } from "./utils.js";
9
+ import { usePendingState as k } from "../../utils/hooks.js";
10
+ const E = ({
10
11
  className: b,
11
- onChange: o,
12
+ onChange: P,
12
13
  variant: $ = "inline",
13
- options: e = [],
14
- value: l,
15
- isDisabled: c,
16
- previousLabel: h = "Previous",
17
- nextLabel: N = "Next",
18
- selectLabel: _ = "Select",
19
- ...m
14
+ options: n = [],
15
+ value: g,
16
+ isDisabled: l,
17
+ previousLabel: S = "Previous",
18
+ nextLabel: v = "Next",
19
+ selectLabel: C = "Select",
20
+ ...s
20
21
  }) => {
21
- const y = "pagination", { className: p, ...I } = P(m, "Pagination"), { id: s } = m;
22
+ const N = "pagination", { className: u, ..._ } = w(s, "Pagination"), { id: c } = s, { pendingState: y, setPendingState: I } = k(o(g)), m = y || g, d = (t, e) => {
23
+ const a = o(t);
24
+ I(a), P(a, e);
25
+ };
22
26
  return /* @__PURE__ */ O(
23
27
  "div",
24
28
  {
25
- className: u(`${i}-${y}`, { [`${p}__wrapper`]: p }, b),
26
- ...I,
27
- ...m,
29
+ className: p(`${r}-${N}`, { [`${u}__wrapper`]: u }, b),
30
+ ..._,
31
+ ...s,
28
32
  children: [
29
- /* @__PURE__ */ n(
30
- g,
33
+ /* @__PURE__ */ i(
34
+ h,
31
35
  {
32
- className: u(`${i}__pagination-button`, `${i}-left-arrow`),
36
+ className: p(`${r}__pagination-button`, `${r}-left-arrow`),
33
37
  onClick: () => {
34
- const t = e.findIndex((d) => r(d) === l) - 1, a = e.at(t) || "";
35
- o(r(a));
38
+ const t = n.findIndex((a) => o(a) === m) - 1, e = n.at(t) || "";
39
+ d(e);
36
40
  },
37
- "data-testid": `${s}-previous-button`,
38
- isDisabled: c,
39
- "aria-label": h,
41
+ "data-testid": `${c}-previous-button`,
42
+ isDisabled: l,
43
+ "aria-label": S,
40
44
  variant: x.tertiary,
41
- children: /* @__PURE__ */ n(f, {})
45
+ children: /* @__PURE__ */ i(f, {})
42
46
  }
43
47
  ),
44
- /* @__PURE__ */ n(
45
- S,
48
+ /* @__PURE__ */ i(
49
+ V,
46
50
  {
47
- className: $ === "inline" && `${i}--inline-pagination`,
48
- "aria-label": _,
49
- value: l,
51
+ className: $ === "inline" && `${r}--inline-pagination`,
52
+ "aria-label": C,
53
+ value: m,
50
54
  onChange: (t) => {
51
- const a = v(e, t == null ? void 0 : t.currentTarget.value);
52
- a && o(r(a), t);
55
+ const e = j(n, t == null ? void 0 : t.currentTarget.value);
56
+ e && d(e, t);
53
57
  },
54
- "data-testid": `${s}-select-button`,
58
+ "data-testid": `${c}-select-button`,
55
59
  hideLabel: !0,
56
- disabled: c,
57
- children: e.map((t) => {
58
- const a = r(t);
59
- return /* @__PURE__ */ n("option", { value: a, children: typeof t == "string" || typeof t == "number" ? t : t.label }, a);
60
+ disabled: l,
61
+ children: n.map((t) => {
62
+ const e = o(t);
63
+ return /* @__PURE__ */ i("option", { value: e, children: typeof t == "string" || typeof t == "number" ? t : t.label }, e);
60
64
  })
61
65
  }
62
66
  ),
63
- /* @__PURE__ */ n(
64
- g,
67
+ /* @__PURE__ */ i(
68
+ h,
65
69
  {
66
- className: `${i}__pagination-button`,
70
+ className: `${r}__pagination-button`,
67
71
  onClick: () => {
68
- const t = (e.findIndex((d) => r(d) === l) + 1) % e.length, a = e[t];
69
- o(r(a));
72
+ const t = (n.findIndex((a) => o(a) === m) + 1) % n.length, e = n[t];
73
+ d(e);
70
74
  },
71
- "data-testid": `${s}-next-button`,
72
- isDisabled: c,
73
- "aria-label": N,
75
+ "data-testid": `${c}-next-button`,
76
+ isDisabled: l,
77
+ "aria-label": v,
74
78
  variant: x.tertiary,
75
- children: /* @__PURE__ */ n(f, {})
79
+ children: /* @__PURE__ */ i(f, {})
76
80
  }
77
81
  )
78
82
  ]
@@ -80,5 +84,5 @@ const R = ({
80
84
  );
81
85
  };
82
86
  export {
83
- R as default
87
+ E as default
84
88
  };
package/dist/index.d.ts CHANGED
@@ -52,3 +52,4 @@ export * from './components/PinchZoom';
52
52
  export * from './components/Tabs';
53
53
  export * from './components/SeldonImage';
54
54
  export * from './patterns/SaleHeaderBanner';
55
+ export * from './utils/hooks';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { PaddingTokens as f, SpacingTokens as l, defaultYear as s, emailValidation as m, encodeURLSearchParams as p, findChildrenExcludingTypes as d, findChildrenOfType as u, generatePaddingClassName as n, getCommonProps as x, noOp as i, px as g, useNormalizedInputProps as c } from "./utils/index.js";
1
+ import { PaddingTokens as f, SpacingTokens as l, defaultYear as s, emailValidation as m, encodeURLSearchParams as p, findChildrenExcludingTypes as d, findChildrenOfType as n, generatePaddingClassName as u, getCommonProps as x, noOp as i, px as g, useNormalizedInputProps as c } from "./utils/index.js";
2
2
  import { default as C } from "./pages/Page.js";
3
3
  import { default as P } from "./components/Button/Button.js";
4
4
  import { ButtonVariants as b } from "./components/Button/types.js";
@@ -23,7 +23,7 @@ import { GridItemAlign as ae } from "./components/GridItem/types.js";
23
23
  import { default as le } from "./components/Search/Search.js";
24
24
  import { default as me } from "./components/Select/Select.js";
25
25
  import { default as de } from "./components/SplitPanel/SplitPanel.js";
26
- import { default as ne } from "./patterns/Subscribe/Subscribe.js";
26
+ import { default as ue } from "./patterns/Subscribe/Subscribe.js";
27
27
  import { SubscriptionState as ie } from "./patterns/Subscribe/types.js";
28
28
  import { default as ce } from "./patterns/Social/Social.js";
29
29
  import { default as Ce } from "./patterns/ViewingsList/ViewingsList.js";
@@ -52,7 +52,7 @@ import { default as ro } from "./components/ContentPeek/ContentPeek.js";
52
52
  import { default as fo } from "./components/Collapsible/Collapsible.js";
53
53
  import { default as so } from "./components/Collapsible/CollapsibleContent.js";
54
54
  import { default as po } from "./components/Collapsible/CollapsibleTrigger.js";
55
- import { SeldonProvider as no } from "./providers/SeldonProvider/SeldonProvider.js";
55
+ import { SeldonProvider as uo } from "./providers/SeldonProvider/SeldonProvider.js";
56
56
  import { default as io } from "./components/PageContentWrapper/PageContentWrapper.js";
57
57
  import { default as co } from "./components/Carousel/Carousel.js";
58
58
  import { default as Co } from "./components/Carousel/CarouselContent.js";
@@ -69,6 +69,7 @@ import { default as Oo } from "./patterns/SaleHeaderBanner/SaleHeaderBanner.js";
69
69
  import { default as Uo } from "./patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
70
70
  import { default as Fo } from "./patterns/SaleHeaderBanner/SaleHeaderCountdown.js";
71
71
  import { AuctionState as Yo } from "./patterns/SaleHeaderBanner/types.js";
72
+ import { usePendingState as jo } from "./utils/hooks.js";
72
73
  export {
73
74
  Ee as Accordion,
74
75
  Oe as AccordionItem,
@@ -122,13 +123,13 @@ export {
122
123
  Fo as SaleHeaderCountdown,
123
124
  le as Search,
124
125
  Eo as SeldonImage,
125
- no as SeldonProvider,
126
+ uo as SeldonProvider,
126
127
  me as Select,
127
128
  ce as Social,
128
129
  l as SpacingTokens,
129
130
  de as SplitPanel,
130
131
  Be as StatefulViewingsList,
131
- ne as Subscribe,
132
+ ue as Subscribe,
132
133
  ie as SubscriptionState,
133
134
  qe as SupportedLanguages,
134
135
  vo as TabsContainer,
@@ -144,10 +145,11 @@ export {
144
145
  m as emailValidation,
145
146
  p as encodeURLSearchParams,
146
147
  d as findChildrenExcludingTypes,
147
- u as findChildrenOfType,
148
- n as generatePaddingClassName,
148
+ n as findChildrenOfType,
149
+ u as generatePaddingClassName,
149
150
  x as getCommonProps,
150
151
  i as noOp,
151
152
  g as px,
152
- c as useNormalizedInputProps
153
+ c as useNormalizedInputProps,
154
+ jo as usePendingState
153
155
  };
@@ -1,4 +1,4 @@
1
- import { __module as t } from "../../_virtual/index6.js";
1
+ import { __module as t } from "../../_virtual/index5.js";
2
2
  /*!
3
3
  Copyright (c) 2015 Jed Watson.
4
4
  Based on code that is Copyright 2013-2015, Facebook, Inc.
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../../../_virtual/index5.js";
1
+ import { __module as e } from "../../../../_virtual/index6.js";
2
2
  import { __require as o } from "./cjs/react-is.production.min.js";
3
3
  import { __require as t } from "./cjs/react-is.development.js";
4
4
  var r;
@@ -6,69 +6,71 @@ import { SupportedLanguages as s } from "../../types/commonTypes.js";
6
6
  import C from "../../components/Dropdown/Dropdown.js";
7
7
  import k from "../../components/Accordion/Accordion.js";
8
8
  import w from "../../components/Accordion/AccordionItem.js";
9
- import y from "../../components/Navigation/NavigationItem/NavigationItem.js";
10
- import { LinkVariants as M } from "../../components/Link/types.js";
11
- import { TextVariants as E } from "../../components/Text/types.js";
12
- import P from "../../components/Text/Text.js";
13
- import V from "../../components/Navigation/NavigationList/NavigationList.js";
9
+ import { AccordionItemVariant as y } from "../../components/Accordion/types.js";
10
+ import M from "../../components/Navigation/NavigationItem/NavigationItem.js";
11
+ import { LinkVariants as V } from "../../components/Link/types.js";
12
+ import { TextVariants as A } from "../../components/Text/types.js";
13
+ import E from "../../components/Text/Text.js";
14
+ import I from "../../components/Navigation/NavigationList/NavigationList.js";
14
15
  import { SSRMediaQuery as f } from "../../providers/SeldonProvider/utils.js";
15
- const j = ({
16
+ const P = ({
16
17
  id: a,
17
- value: n,
18
+ value: l,
18
19
  // can't be passed to the accordion
19
- onValueChange: r,
20
+ onValueChange: o,
20
21
  label: t,
21
- options: l,
22
+ options: n,
22
23
  ...m
23
24
  }) => /* @__PURE__ */ e(k, { ...m, children: /* @__PURE__ */ e(
24
25
  w,
25
26
  {
26
27
  hasTransition: !0,
27
28
  id: a != null ? a : "language-selector-accordion",
28
- label: /* @__PURE__ */ e(P, { variant: E.snwHeaderLink, children: t }),
29
- children: /* @__PURE__ */ e(V, { id: `${a}-navlist`, children: l.map((o) => /* @__PURE__ */ e(
30
- y,
29
+ label: /* @__PURE__ */ e(E, { variant: A.snwHeaderLink, children: t }),
30
+ variant: y.lg,
31
+ children: /* @__PURE__ */ e(I, { id: `${a}-navlist`, children: n.map((r) => /* @__PURE__ */ e(
32
+ M,
31
33
  {
32
- label: o.label,
33
- onClick: () => r(o.value),
34
- navType: M.snwFlyoutLink
34
+ label: r.label,
35
+ onClick: () => o(r.value),
36
+ navType: V.snwFlyoutLink
35
37
  },
36
- o.value
38
+ r.value
37
39
  )) })
38
40
  }
39
- ) }), A = S(
41
+ ) }), j = S(
40
42
  ({
41
43
  className: a,
42
- currentLanguage: n = s.en,
43
- languageOptions: r = [
44
+ currentLanguage: l = s.en,
45
+ languageOptions: o = [
44
46
  { label: "English", value: s.en },
45
47
  { label: "中文", value: s.zh }
46
48
  ],
47
49
  onLanguageChange: t = T,
48
- id: l,
50
+ id: n,
49
51
  isHidden: m,
50
- ...o
52
+ ...r
51
53
  }, c) => {
52
- var d, g;
53
- const { className: p, ...h } = N({ id: l }, "LanguageSelector"), v = (g = (d = r.find((i) => i.value === n)) == null ? void 0 : d.label) != null ? g : "English", u = {
54
+ var u, g;
55
+ const { className: p, ...h } = N({ id: n }, "LanguageSelector"), v = (g = (u = o.find((i) => i.value === l)) == null ? void 0 : u.label) != null ? g : "English", d = {
54
56
  ...h,
55
- ...o,
56
- id: l,
57
+ ...r,
58
+ id: n,
57
59
  className: x(p, a, {
58
60
  [`${p}--hidden`]: m
59
61
  }),
60
- options: r,
61
- value: n,
62
+ options: o,
63
+ value: l,
62
64
  onValueChange: (i) => t(i),
63
65
  label: v
64
66
  };
65
67
  return /* @__PURE__ */ b(L, { children: [
66
- /* @__PURE__ */ e(f.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ e(C, { ...u, ref: c }) }),
67
- /* @__PURE__ */ e(f.Media, { lessThan: "md", children: /* @__PURE__ */ e(j, { ...u, ref: c }) })
68
+ /* @__PURE__ */ e(f.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ e(C, { ...d, ref: c }) }),
69
+ /* @__PURE__ */ e(f.Media, { lessThan: "md", children: /* @__PURE__ */ e(P, { ...d, ref: c }) })
68
70
  ] });
69
71
  }
70
72
  );
71
- A.displayName = "LanguageSelector";
73
+ j.displayName = "LanguageSelector";
72
74
  export {
73
- A as default
75
+ j as default
74
76
  };
@@ -2,14 +2,16 @@
2
2
 
3
3
  .#{$px}-accordion {
4
4
  border-top: 1px solid $light-gray;
5
- margin-bottom: 10px;
6
5
  width: 100%;
7
6
  }
8
7
 
9
8
  .#{$px}-accordion-item {
10
- padding: $spacing-sm 0;
11
9
  width: 100%;
12
10
 
11
+ &--large {
12
+ padding: $spacing-md 0;
13
+ }
14
+
13
15
  svg {
14
16
  max-width: unset;
15
17
  }
@@ -24,7 +26,11 @@
24
26
  }
25
27
 
26
28
  &__content {
27
- margin: $spacing-sm 0;
29
+ padding-bottom: $spacing-md;
30
+
31
+ &--locked {
32
+ padding-bottom: $spacing-sm;
33
+ }
28
34
  }
29
35
 
30
36
  &__content--lg {
@@ -84,6 +90,7 @@
84
90
  to {
85
91
  height: 0;
86
92
  opacity: 0;
93
+ padding: 0;
87
94
  }
88
95
  }
89
96
  }
@@ -93,6 +100,11 @@
93
100
  display: flex;
94
101
  flex-direction: row;
95
102
  justify-content: space-between;
103
+ padding: $spacing-sm 0;
104
+
105
+ &--large {
106
+ padding: $spacing-md 0;
107
+ }
96
108
 
97
109
  &--hoverable {
98
110
  cursor: pointer;
@@ -61,11 +61,15 @@ $lg: #{$px}-input--lg;
61
61
  // Disabled
62
62
  &--disabled {
63
63
  color: $keyline-gray;
64
+ cursor: default;
64
65
 
65
66
  .#{$px}-input__label,
66
67
  .#{$px}-input__input {
67
68
  color: inherit;
68
- cursor: not-allowed;
69
+ }
70
+ .#{$px}-input__label:hover,
71
+ .#{$px}-input__input:hover {
72
+ cursor: default;
69
73
  }
70
74
  }
71
75
 
@@ -34,15 +34,17 @@
34
34
  position: relative;
35
35
  text-align: center;
36
36
 
37
- &:hover::after,
38
- &:focus-visible::after {
39
- background: $pure-black;
40
- bottom: -1px;
41
- content: '';
42
- height: 1px;
43
- left: 0;
44
- position: absolute;
45
- right: 0;
37
+ @include media($breakpoint-md) {
38
+ &:hover::after,
39
+ &:focus-visible::after {
40
+ background: $pure-black;
41
+ bottom: -1px;
42
+ content: '';
43
+ height: 1px;
44
+ left: 0;
45
+ position: absolute;
46
+ right: 0;
47
+ }
46
48
  }
47
49
  }
48
50
 
@@ -46,6 +46,7 @@
46
46
  max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
47
47
  opacity 0.2s cubic-bezier(0.65, 0, 0.35, 1);
48
48
  width: 100%;
49
+
49
50
  .#{$px}-nav__list__section {
50
51
  opacity: 0;
51
52
  transition: opacity 0.3s cubic-bezier(0.33, 1, 0.68, 1) 0.2s;
@@ -67,6 +68,10 @@
67
68
  }
68
69
  }
69
70
 
71
+ &__submenu--mobile.#{$px}-nav__list {
72
+ padding: 0;
73
+ }
74
+
70
75
  @include isHeaderDesktop {
71
76
  ul {
72
77
  background-color: $pure-white;
@@ -62,12 +62,6 @@ $top-transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
62
62
  margin-bottom: 0;
63
63
 
64
64
  &-item {
65
- padding: $spacing-sm 0;
66
-
67
- &__border-bottom {
68
- border-bottom: 1px solid $light-gray;
69
- }
70
-
71
65
  &-label {
72
66
  opacity: 1;
73
67
  }
@@ -76,7 +70,7 @@ $top-transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
76
70
  .#{$px}-link--snwHeaderLink {
77
71
  border-bottom: 1px solid $light-gray;
78
72
  flex-wrap: wrap;
79
- padding: $spacing-sm 0;
73
+ padding: $spacing-md 0;
80
74
  }
81
75
  .#{$px}-link--snwFlyoutLink {
82
76
  padding: 0;
@@ -8,11 +8,16 @@
8
8
  }
9
9
 
10
10
  .#{$px} {
11
- &-icon-button.#{$px}__pagination-button {
12
- @include media($breakpoint-md) {
13
- > svg {
14
- height: 1.75rem;
15
- width: 1.75rem;
11
+ &-icon-button {
12
+ &:disabled {
13
+ border: unset;
14
+ }
15
+ &.#{$px}__pagination-button {
16
+ @include media($breakpoint-md) {
17
+ > svg {
18
+ height: 1.75rem;
19
+ width: 1.75rem;
20
+ }
16
21
  }
17
22
  }
18
23
  }
@@ -25,7 +25,9 @@
25
25
  }
26
26
  .#{$px}-accordion-item {
27
27
  border-top: 1px solid $light-gray;
28
- padding: $spacing-sm 0;
28
+ .#{$px}-nav__list {
29
+ padding: 0;
30
+ }
29
31
 
30
32
  &-label {
31
33
  opacity: 1;
@@ -80,26 +80,19 @@
80
80
 
81
81
  .#{$px}-accordion {
82
82
  border-bottom: 1px solid #eae8e4;
83
- border-top: 1px solid #eae8e4;
83
+ border-top: unset;
84
84
  margin-bottom: $spacing-md;
85
85
  width: 100%;
86
86
 
87
87
  &-item {
88
- padding: 0;
89
-
90
- ul {
91
- padding-bottom: $spacing-md;
92
- }
93
-
94
88
  &--expanded {
95
- margin-bottom: $spacing-md;
96
89
  margin-top: 0;
97
90
  padding: 0;
98
91
  }
99
92
 
100
93
  &-label {
101
94
  opacity: 1;
102
- padding: $spacing-sm 0;
95
+ padding: $spacing-md 0 $spacing-sm;
103
96
 
104
97
  @include media($size-md) {
105
98
  cursor: unset;
@@ -137,7 +137,7 @@
137
137
 
138
138
  &--closed {
139
139
  display: unset;
140
- left: -100vw;
140
+ left: -100%;
141
141
  }
142
142
  }
143
143
 
@@ -157,13 +157,6 @@
157
157
  height: 100%;
158
158
  }
159
159
  }
160
-
161
- .#{$px}-nav__item {
162
- .#{$px}-link--snwHeaderLink {
163
- align-content: center;
164
- height: 100%;
165
- }
166
- }
167
160
  }
168
161
 
169
162
  &__overlay {
@@ -185,4 +178,10 @@
185
178
  height: 1rem;
186
179
  width: 1.5rem;
187
180
  }
181
+
182
+ @include isHeaderMobile {
183
+ .#{$px}-nav__list .#{$px}-nav__item:last-child .#{$px}-link--snwHeaderLink {
184
+ border-bottom: none;
185
+ }
186
+ }
188
187
  }
@@ -36,7 +36,7 @@ export declare const HeaderContext: React.Context<HeaderContextType>;
36
36
  /**
37
37
  * ## Overview
38
38
  *
39
- * This component allows navigation, search, login/logout, and language selection and supports desktop and mobile layouts. It requires the <SeldonProvider> to be wrapped around it to support SSR Media Queries.
39
+ * This component allows navigation, search, login/logout, and language selection and supports desktop and mobile layouts. It requires the `<SeldonProvider>` to be wrapped around it to support SSR Media Queries.
40
40
  *
41
41
  * [Figma Link Mobile](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?node-id=10877-33417&node-type=INSTANCE&m=dev)
42
42
  *
@@ -0,0 +1,4 @@
1
+ export declare const usePendingState: <StateType>(value: StateType) => {
2
+ pendingState: StateType | null;
3
+ setPendingState: import("react").Dispatch<import("react").SetStateAction<StateType | null>>;
4
+ };
@@ -0,0 +1,10 @@
1
+ import { useState as s, useEffect as i } from "react";
2
+ const r = (t) => {
3
+ const [n, e] = s(null);
4
+ return i(() => {
5
+ t && e(null);
6
+ }, [t]), { pendingState: n, setPendingState: e };
7
+ };
8
+ export {
9
+ r as usePendingState
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.77.1",
3
+ "version": "1.77.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"