@phillips/seldon 1.57.1 → 1.58.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.
@@ -1,38 +1,40 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
2
  import { getCommonProps as d, noOp as p } from "../../utils/index.js";
3
- import a from "../../node_modules/classnames/index.js";
4
- import { Root as f, Portal as C, Overlay as h, Content as N, Title as u, Description as v, Close as w } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
5
- import _ from "../../assets/close.svg.js";
6
- import g from "../IconButton/IconButton.js";
7
- const j = ({ className: l, isOpen: i = !1, onClose: r = p, children: m, ...s }) => {
8
- const { className: o, ...n } = d(s, "Drawer");
9
- return /* @__PURE__ */ e(
3
+ import o from "../../node_modules/classnames/index.js";
4
+ import { Root as f, Portal as C, Overlay as h, Content as u, Title as v, Description as N, Close as w } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
5
+ import y from "../../assets/close.svg.js";
6
+ import _ from "../IconButton/IconButton.js";
7
+ import { ButtonVariants as g } from "../Button/types.js";
8
+ const B = ({ className: i, isOpen: l = !1, onClose: a = p, children: m, ...t }) => {
9
+ const { className: e, ...n } = d(t, "Drawer");
10
+ return /* @__PURE__ */ r(
10
11
  f,
11
12
  {
12
- open: i,
13
+ open: l,
13
14
  onOpenChange: (c) => {
14
- c || r();
15
+ c || a();
15
16
  },
16
- children: /* @__PURE__ */ t(C, { children: [
17
- /* @__PURE__ */ e(
17
+ children: /* @__PURE__ */ s(C, { children: [
18
+ /* @__PURE__ */ r(
18
19
  h,
19
20
  {
20
- onClick: r,
21
- className: a(`${o}__overlay`),
21
+ onClick: a,
22
+ className: o(`${e}__overlay`),
22
23
  "data-testid": "drawer-overlay"
23
24
  }
24
25
  ),
25
- /* @__PURE__ */ t(N, { className: a(o, l), id: s.id, ...n, children: [
26
- /* @__PURE__ */ e(u, {}),
27
- /* @__PURE__ */ e(v, {}),
28
- /* @__PURE__ */ e(w, { asChild: !0, children: /* @__PURE__ */ e(
29
- g,
26
+ /* @__PURE__ */ s(u, { className: o(e, i), id: t.id, ...n, children: [
27
+ /* @__PURE__ */ r(v, {}),
28
+ /* @__PURE__ */ r(N, {}),
29
+ /* @__PURE__ */ r(w, { asChild: !0, children: /* @__PURE__ */ r(
30
+ _,
30
31
  {
31
- onClick: r,
32
- className: a(`${o}__close`),
32
+ onClick: a,
33
+ className: o(`${e}__close`),
33
34
  "aria-label": "Close",
34
35
  "data-testid": "drawer-close",
35
- children: /* @__PURE__ */ e(_, {})
36
+ variant: g.tertiary,
37
+ children: /* @__PURE__ */ r(y, {})
36
38
  }
37
39
  ) }),
38
40
  m
@@ -42,5 +44,5 @@ const j = ({ className: l, isOpen: i = !1, onClose: r = p, children: m, ...s })
42
44
  );
43
45
  };
44
46
  export {
45
- j as default
47
+ B as default
46
48
  };
@@ -1,47 +1,49 @@
1
- import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
- import e from "../../node_modules/classnames/index.js";
1
+ import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
+ import t from "../../node_modules/classnames/index.js";
3
3
  import { getCommonProps as f, noOp as u } from "../../utils/index.js";
4
4
  import C from "../../assets/close.svg.js";
5
5
  import m from "../../node_modules/react-modal/lib/index.js";
6
6
  import N from "../IconButton/IconButton.js";
7
- const h = ({
8
- children: r,
9
- className: n,
7
+ import { ButtonVariants as v } from "../Button/types.js";
8
+ const j = ({
9
+ children: l,
10
+ className: i,
10
11
  isOpen: o = !1,
11
- onClose: s = u,
12
- appElementSelector: i = "main",
13
- ...l
12
+ onClose: r = u,
13
+ appElementSelector: n = "main",
14
+ ...e
14
15
  }) => {
15
16
  if (!o)
16
17
  return null;
17
- const { className: a, "data-testid": c, ...d } = f(l, "Modal");
18
- return m.setAppElement(i), /* @__PURE__ */ p(
18
+ const { className: a, "data-testid": c, ...d } = f(e, "Modal");
19
+ return m.setAppElement(n), /* @__PURE__ */ p(
19
20
  m,
20
21
  {
21
22
  ...d,
22
23
  isOpen: o,
23
- onRequestClose: s,
24
- className: e(a, n),
25
- overlayClassName: e(`${a}__overlay`),
24
+ onRequestClose: r,
25
+ className: t(a, i),
26
+ overlayClassName: t(`${a}__overlay`),
26
27
  ariaHideApp: o,
27
28
  testId: c,
28
- ...l,
29
+ ...e,
29
30
  children: [
30
- /* @__PURE__ */ t(
31
+ /* @__PURE__ */ s(
31
32
  N,
32
33
  {
33
34
  id: "modal-button",
34
- onClick: s,
35
+ onClick: r,
35
36
  "aria-label": "Close Modal",
36
- className: e(`${a}__close`),
37
- children: /* @__PURE__ */ t(C, {})
37
+ className: t(`${a}__close`),
38
+ variant: v.tertiary,
39
+ children: /* @__PURE__ */ s(C, {})
38
40
  }
39
41
  ),
40
- r
42
+ l
41
43
  ]
42
44
  }
43
45
  );
44
46
  };
45
47
  export {
46
- h as default
48
+ j as default
47
49
  };
@@ -1,62 +1,65 @@
1
- import { jsxs as N, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as _, jsx as r } from "react/jsx-runtime";
2
2
  import s from "../../node_modules/classnames/index.js";
3
- import { getCommonProps as _, px as i } from "../../utils/index.js";
4
- import P from "../Select/Select.js";
3
+ import { getCommonProps as P, px as i } from "../../utils/index.js";
4
+ import C from "../Select/Select.js";
5
5
  import d from "../../assets/chevronRight.svg.js";
6
6
  import u from "../IconButton/IconButton.js";
7
- const y = ({
8
- className: f,
7
+ import { ButtonVariants as f } from "../Button/types.js";
8
+ const B = ({
9
+ className: g,
9
10
  onChange: n,
10
- variant: g = "inline",
11
+ variant: p = "inline",
11
12
  options: t = [],
12
- value: r,
13
- isDisabled: l,
13
+ value: e,
14
+ isDisabled: o,
14
15
  previousLabel: $ = "Previous",
15
16
  nextLabel: b = "Next",
16
- selectLabel: p = "Select",
17
- ...o
17
+ selectLabel: h = "Select",
18
+ ...l
18
19
  }) => {
19
- const h = "pagination", { className: c, ...x } = _(o, "Pagination"), { id: m } = o;
20
- return /* @__PURE__ */ N(
20
+ const x = "pagination", { className: c, ...N } = P(l, "Pagination"), { id: m } = l;
21
+ return /* @__PURE__ */ _(
21
22
  "div",
22
23
  {
23
- className: s(`${i}-${h}`, { [`${c}__wrapper`]: c }, f),
24
- ...x,
25
- ...o,
24
+ className: s(`${i}-${x}`, { [`${c}__wrapper`]: c }, g),
25
+ ...N,
26
+ ...l,
26
27
  children: [
27
- /* @__PURE__ */ e(
28
+ /* @__PURE__ */ r(
28
29
  u,
29
30
  {
30
31
  className: s(`${i}__pagination-button`, `${i}-left-arrow`),
31
- onClick: () => n(t.at(t.findIndex((a) => a === r) - 1) || ""),
32
+ onClick: () => n(t.at(t.findIndex((a) => a === e) - 1) || ""),
32
33
  "data-testid": `${m}-previous-button`,
33
- isDisabled: l,
34
+ isDisabled: o,
34
35
  "aria-label": $,
35
- children: /* @__PURE__ */ e(d, {})
36
+ variant: f.tertiary,
37
+ children: /* @__PURE__ */ r(d, {})
36
38
  }
37
39
  ),
38
- /* @__PURE__ */ e(
39
- P,
40
+ /* @__PURE__ */ r(
41
+ C,
40
42
  {
41
- className: g === "inline" && `${i}--inline-pagination`,
42
- "aria-label": p,
43
- value: r,
43
+ className: p === "inline" && `${i}--inline-pagination`,
44
+ "aria-label": h,
45
+ value: e,
44
46
  onChange: (a) => n(a == null ? void 0 : a.currentTarget.value, a),
45
47
  "data-testid": `${m}-select-button`,
46
48
  hideLabel: !0,
47
- disabled: l,
48
- children: t.map((a) => /* @__PURE__ */ e("option", { value: a, children: a }, a))
49
+ disabled: o,
50
+ children: t.map((a) => /* @__PURE__ */ r("option", { value: a, children: a }, a))
49
51
  }
50
52
  ),
51
- /* @__PURE__ */ e(
53
+ /* @__PURE__ */ r(
52
54
  u,
53
55
  {
54
56
  className: `${i}__pagination-button`,
55
- onClick: () => n(t[(t.findIndex((a) => a === r) + 1) % t.length] || ""),
57
+ onClick: () => n(t[(t.findIndex((a) => a === e) + 1) % t.length] || ""),
56
58
  "data-testid": `${m}-next-button`,
57
- isDisabled: l,
59
+ isDisabled: o,
58
60
  "aria-label": b,
59
- children: /* @__PURE__ */ e(d, {})
61
+ variant: f.tertiary,
62
+ children: /* @__PURE__ */ r(d, {})
60
63
  }
61
64
  )
62
65
  ]
@@ -64,5 +67,5 @@ const y = ({
64
67
  );
65
68
  };
66
69
  export {
67
- y as default
70
+ B as default
68
71
  };
@@ -9,6 +9,7 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
9
9
  * The OOTB style to apply to the text
10
10
  */
11
11
  variant?: TextVariants;
12
+ superScript?: string;
12
13
  }
13
14
  /**
14
15
  * ## Overview
@@ -19,5 +20,5 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
19
20
  *
20
21
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-text--overview)
21
22
  */
22
- declare const Text: ({ children, className, element: CustomElement, variant, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
23
+ declare const Text: ({ children, className, element: CustomElement, variant, superScript, ...props }: TextProps) => import("react/jsx-runtime").JSX.Element;
23
24
  export default Text;
@@ -1,20 +1,30 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { getCommonProps as c } from "../../utils/index.js";
1
+ import { jsxs as i, jsx as p } from "react/jsx-runtime";
2
+ import { getCommonProps as x } from "../../utils/index.js";
3
3
  import { TextVariants as f } from "./types.js";
4
- import { determineDefaultTextElement as i, determineTextClassName as p } from "./utils.js";
5
- import x from "../../node_modules/classnames/index.js";
6
- const b = ({ children: t, className: o, element: s, variant: e = f.body2, ...m }) => {
7
- const r = s || i(e), { className: a, ...n } = c(m, "Text");
8
- return /* @__PURE__ */ l(
9
- r,
4
+ import { determineDefaultTextElement as d, determineTextClassName as N } from "./utils.js";
5
+ import o from "../../node_modules/classnames/index.js";
6
+ const j = ({
7
+ children: r,
8
+ className: a,
9
+ element: n,
10
+ variant: e = f.body2,
11
+ superScript: m = "",
12
+ ...s
13
+ }) => {
14
+ const l = n || d(e), { className: t, ...c } = x(s, "Text");
15
+ return /* @__PURE__ */ i(
16
+ l,
10
17
  {
11
- ...n,
12
- className: x(a, o, p(e)),
13
- ...m,
14
- children: t
18
+ ...c,
19
+ className: o(t, a, N(e)),
20
+ ...s,
21
+ children: [
22
+ r,
23
+ m ? /* @__PURE__ */ p("span", { className: o(`${t}--super-script`), children: m }) : null
24
+ ]
15
25
  }
16
26
  );
17
27
  };
18
28
  export {
19
- b as default
29
+ j as default
20
30
  };
@@ -5,21 +5,21 @@ import p from "../../components/Button/Button.js";
5
5
  import { ButtonVariants as d } from "../../components/Button/types.js";
6
6
  import { TextVariants as u } from "../../components/Text/types.js";
7
7
  import N from "../../components/Text/Text.js";
8
- const S = ({
9
- className: s,
10
- children: a,
11
- titleText: e = "Never Miss A Moment",
8
+ const T = ({
9
+ className: a,
10
+ children: e,
11
+ titleText: s = "Never Miss A Moment",
12
12
  buttonText: m = "Subscribe To Our Newsletter",
13
13
  onSubscribeClick: i,
14
- ...r
14
+ ...o
15
15
  }) => {
16
- const { className: o, ...n } = f(r, "Social");
17
- return /* @__PURE__ */ c("div", { ...n, className: l(o, s), ...r, children: [
18
- /* @__PURE__ */ t(N, { variant: u.heading4, className: `${o}__header`, children: e }),
19
- /* @__PURE__ */ t(p, { onClick: i, variant: d.ghost, className: `${o}__button`, children: m }),
20
- a
16
+ const { className: r, ...n } = f(o, "Social");
17
+ return /* @__PURE__ */ c("div", { ...n, className: l(r, a), ...o, children: [
18
+ /* @__PURE__ */ t(N, { variant: u.heading4, className: `${r}__header`, children: s }),
19
+ /* @__PURE__ */ t(p, { onClick: i, variant: d.tertiary, className: `${r}__button`, children: m }),
20
+ e
21
21
  ] });
22
22
  };
23
23
  export {
24
- S as default
24
+ T as default
25
25
  };
@@ -71,9 +71,8 @@
71
71
  background-color: $pure-white;
72
72
  border: 1px solid $pure-black;
73
73
  color: $pure-black;
74
- mix-blend-mode: difference;
75
- position: relative;
76
74
  transition: border 0.3s ease-out;
75
+ z-index: 0;
77
76
 
78
77
  &::before {
79
78
  border-radius: 100px;
@@ -27,3 +27,8 @@ h6.#{$px}-text {
27
27
  p.#{$px}-text {
28
28
  margin-bottom: $spacing-md;
29
29
  }
30
+ .#{$px}-text--super-script {
31
+ font-size: 60%;
32
+ margin-left: $spacing-xsm;
33
+ vertical-align: text-bottom;
34
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.57.1",
3
+ "version": "1.58.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"