@phillips/seldon 1.33.0 → 1.34.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.
@@ -32,6 +32,10 @@ export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement>
32
32
  * When true applied the transition keyframe animation on item expand. Default as false.
33
33
  */
34
34
  hasTransition?: boolean;
35
+ /**
36
+ * When true, isCollapsed won't be toggled.
37
+ */
38
+ isControlled?: boolean;
35
39
  }
36
- declare const AccordionItem: ({ isLocked, isLockedVariation, variation, label, isLastItem, hasTransition, children, type, ...props }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
40
+ declare const AccordionItem: ({ isLocked, isLockedVariation, variation, label, isLastItem, hasTransition, children, type, isControlled, ...props }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
37
41
  export default AccordionItem;
@@ -1,38 +1,38 @@
1
1
  import { jsxs as f, jsx as e, Fragment as h } from "react/jsx-runtime";
2
- import { useState as v } from "react";
3
- import { getCommonProps as x } from "../../utils/index.js";
4
- import p from "../../assets/plus.svg.js";
5
- import C from "../../assets/minus.svg.js";
6
- import A from "../../assets/lock.svg.js";
7
- import m from "../../node_modules/classnames/index.js";
8
- import { Item as T, Trigger as j, Content as k } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
9
- const N = ({
10
- children: o,
2
+ import { useState as p } from "react";
3
+ import { getCommonProps as v, noOp as x } from "../../utils/index.js";
4
+ import C from "../../assets/plus.svg.js";
5
+ import A from "../../assets/minus.svg.js";
6
+ import T from "../../assets/lock.svg.js";
7
+ import s from "../../node_modules/classnames/index.js";
8
+ import { Item as j, Trigger as k, Content as N } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
9
+ const B = ({
10
+ children: n,
11
11
  className: c,
12
12
  baseClassName: t,
13
- disable: n,
14
- isCollapsed: i,
13
+ disable: o,
14
+ isCollapsed: r,
15
15
  setIsCollapsed: d,
16
- isLargeVariation: l,
17
- isLockedVariation: s,
18
- id: r
16
+ isLargeVariation: i,
17
+ isLockedVariation: m,
18
+ id: a
19
19
  }) => {
20
- const a = () => !n && d((I) => !I), u = n ? A : i ? p : C, $ = `${r}-` + (n ? "lockedIcon" : s ? "lockBlueIcon" : i ? "plusIcon" : "minusIcon");
20
+ const l = () => !o && d((I) => !I), u = o ? T : r ? C : A, $ = `${a}-` + (o ? "lockedIcon" : m ? "lockBlueIcon" : r ? "plusIcon" : "minusIcon");
21
21
  return /* @__PURE__ */ e(
22
- j,
22
+ k,
23
23
  {
24
- "data-disabled": n,
24
+ "data-disabled": o,
25
25
  asChild: !0,
26
- className: m(t, { [`${t}--hoverable`]: !n }, c),
27
- children: /* @__PURE__ */ f("div", { onClick: a, "data-testid": `${r}-trigger`, children: [
28
- /* @__PURE__ */ e("div", { className: m(`${t}__text`, { [`${t}__text--lg`]: l }), children: o }),
26
+ className: s(t, { [`${t}--hoverable`]: !o }, c),
27
+ children: /* @__PURE__ */ f("div", { onClick: l, "data-testid": `${a}-trigger`, children: [
28
+ /* @__PURE__ */ e("div", { className: s(`${t}__text`, { [`${t}__text--lg`]: i }), children: n }),
29
29
  /* @__PURE__ */ e(
30
30
  "img",
31
31
  {
32
- className: m(
32
+ className: s(
33
33
  `${t}__icon`,
34
- { [`${t}__icon--lg`]: l },
35
- s && `${t}--blue-fill`
34
+ { [`${t}__icon--lg`]: i },
35
+ m && `${t}--blue-fill`
36
36
  ),
37
37
  src: u,
38
38
  "data-testid": $,
@@ -42,67 +42,68 @@ const N = ({
42
42
  ] })
43
43
  }
44
44
  );
45
- }, P = ({
46
- children: o,
45
+ }, F = ({
46
+ children: n,
47
47
  baseClassName: c,
48
48
  disable: t,
49
- hasTransition: n,
50
- isLargeVariation: i,
49
+ hasTransition: o,
50
+ isLargeVariation: r,
51
51
  isCollapsed: d,
52
- className: l
53
- }) => /* @__PURE__ */ e(h, { children: t && o ? /* @__PURE__ */ e("div", { children: o }) : /* @__PURE__ */ e(
54
- k,
52
+ className: i
53
+ }) => /* @__PURE__ */ e(h, { children: t && n ? /* @__PURE__ */ e("div", { children: n }) : /* @__PURE__ */ e(
54
+ N,
55
55
  {
56
56
  asChild: !0,
57
- className: m(
58
- { [`${c}__content--lg`]: i },
59
- { [`${c}--transition`]: n },
57
+ className: s(
58
+ { [`${c}__content--lg`]: r },
59
+ { [`${c}--transition`]: o },
60
60
  { [`${c}--expanded`]: !d },
61
- l
61
+ i
62
62
  ),
63
- children: o
63
+ children: n
64
64
  }
65
- ) }), z = ({
66
- isLocked: o,
65
+ ) }), D = ({
66
+ isLocked: n,
67
67
  isLockedVariation: c,
68
68
  variation: t,
69
- label: n,
70
- isLastItem: i,
69
+ label: o,
70
+ isLastItem: r,
71
71
  hasTransition: d = !1,
72
- children: l,
73
- type: s = "single",
74
- ...r
72
+ children: i,
73
+ type: m = "single",
74
+ isControlled: a = !0,
75
+ ...l
75
76
  }) => {
76
- const [a, u] = v(!0), { className: $, ...I } = x(r, "Accordion"), _ = t === "lg", g = `${$}-item`;
77
+ const [u, $] = p(!0), { className: I } = v(l, "Accordion"), _ = t === "lg", g = `${I}-item`;
77
78
  return /* @__PURE__ */ f(
78
- T,
79
+ j,
79
80
  {
80
- disabled: o,
81
- value: I["data-testid"],
82
- className: m(g, { [`${g}__border-bottom`]: !i }),
81
+ disabled: n,
82
+ value: o,
83
+ className: s(g, { [`${g}__border-bottom`]: !r }),
83
84
  children: [
84
85
  /* @__PURE__ */ e(
85
- N,
86
+ B,
86
87
  {
87
- disable: o,
88
+ disable: n,
88
89
  isLargeVariation: _,
89
90
  isLockedVariation: c,
90
- isCollapsed: a,
91
- setIsCollapsed: u,
92
- id: s === "single" ? r == null ? void 0 : r.id : void 0,
91
+ isCollapsed: u,
92
+ setIsCollapsed: a ? $ : x,
93
+ id: m === "single" ? l == null ? void 0 : l.id : void 0,
93
94
  baseClassName: `${g}-label`,
94
- children: n
95
+ children: o
95
96
  }
96
97
  ),
97
98
  /* @__PURE__ */ e(
98
- P,
99
+ F,
99
100
  {
100
- disable: o,
101
+ disable: n,
101
102
  hasTransition: d,
102
103
  isLargeVariation: _,
103
- isCollapsed: a,
104
+ isCollapsed: u,
104
105
  baseClassName: g,
105
- children: l
106
+ children: i
106
107
  }
107
108
  )
108
109
  ]
@@ -110,5 +111,5 @@ const N = ({
110
111
  );
111
112
  };
112
113
  export {
113
- z as default
114
+ D as default
114
115
  };
@@ -17,5 +17,5 @@ export interface FooterProps extends React.HTMLAttributes<HTMLElement> {
17
17
  *
18
18
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-footer--overview)
19
19
  */
20
- declare const Footer: ({ children, className, copyright, id, navigationComponent, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
20
+ declare const Footer: ({ children, className, copyright, id, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
21
21
  export default Footer;
@@ -1,17 +1,19 @@
1
- import { jsxs as f, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
2
  import i from "../../node_modules/classnames/index.js";
3
- import { px as o, defaultYear as m } from "../../utils/index.js";
4
- import n from "../SplitPanel/SplitPanel.js";
3
+ import { px as e, defaultYear as m } from "../../utils/index.js";
4
+ import f from "../SplitPanel/SplitPanel.js";
5
+ import c from "../../assets/PhillipsLogo.svg.js";
5
6
  const _ = ({
6
7
  children: t,
7
- className: a,
8
+ className: l,
8
9
  copyright: s = `© ${m} Phillips Auctioneers, LLC`,
9
- id: e,
10
- navigationComponent: l
11
- }) => /* @__PURE__ */ f("footer", { "data-testid": e || "footer", id: e, className: i(`${o}-footer`, { className: a }), children: [
12
- /* @__PURE__ */ r("nav", { className: `${o}-footer__navigation`, children: l }),
13
- /* @__PURE__ */ r(n, { className: `${o}-footer__content`, hasBorder: !1, children: t }),
14
- /* @__PURE__ */ r("p", { className: `${o}-footer__copyright`, children: s })
10
+ id: r
11
+ }) => /* @__PURE__ */ a("footer", { "data-testid": r || "footer", id: r, className: i(`${e}-footer`, { className: l }), children: [
12
+ /* @__PURE__ */ o(f, { className: `${e}-footer__content`, hasBorder: !1, children: t }),
13
+ /* @__PURE__ */ a("div", { className: `${e}-footer__copyright`, children: [
14
+ /* @__PURE__ */ o("h1", { "data-testid": "header-logo", className: `${e}-header__logo`, children: /* @__PURE__ */ o("a", { href: "/", "aria-label": "logo", children: /* @__PURE__ */ o(c, {}) }) }),
15
+ s
16
+ ] })
15
17
  ] });
16
18
  export {
17
19
  _ as default
@@ -1,8 +1,17 @@
1
+ import { MouseEventHandler } from 'react';
1
2
  export interface SocialProps extends React.HTMLAttributes<HTMLDivElement> {
2
3
  /**
3
4
  * Title text for the social section
4
5
  */
5
6
  titleText?: string;
7
+ /**
8
+ * Text for the subscribe button
9
+ */
10
+ buttonText?: string;
11
+ /**
12
+ * Function for when the subscribe button is clicked
13
+ */
14
+ onSubscribeClick?: MouseEventHandler<HTMLButtonElement>;
6
15
  }
7
16
  /**
8
17
  * ## Overview
@@ -13,5 +22,5 @@ export interface SocialProps extends React.HTMLAttributes<HTMLDivElement> {
13
22
  *
14
23
  * [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-social--overview)
15
24
  */
16
- declare const Social: ({ className, children, titleText, ...props }: SocialProps) => import("react/jsx-runtime").JSX.Element;
25
+ declare const Social: ({ className, children, titleText, buttonText, onSubscribeClick, ...props }: SocialProps) => import("react/jsx-runtime").JSX.Element;
17
26
  export default Social;
@@ -1,13 +1,22 @@
1
- import { jsxs as r, jsx as c } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
2
  import i from "../../node_modules/classnames/index.js";
3
- import { getCommonProps as n } from "../../utils/index.js";
4
- const h = ({ className: a, children: m, titleText: e = "Follow on Social", ...o }) => {
5
- const { className: s, ...l } = n(o, "Social");
6
- return /* @__PURE__ */ r("div", { ...l, className: i(s, a), ...o, children: [
7
- /* @__PURE__ */ c("h3", { className: `${s}__header`, children: e }),
8
- m
3
+ import { getCommonProps as u } from "../../utils/index.js";
4
+ import N from "../Button/Button.js";
5
+ const f = ({
6
+ className: r,
7
+ children: t,
8
+ titleText: m = "Never Miss A Moment",
9
+ buttonText: a = "Subscribe To Our Newsletter",
10
+ onSubscribeClick: c,
11
+ ...o
12
+ }) => {
13
+ const { className: s, ...l } = u(o, "Social");
14
+ return /* @__PURE__ */ n("div", { ...l, className: i(s, r), ...o, children: [
15
+ /* @__PURE__ */ e("h3", { className: `${s}__header`, children: m }),
16
+ /* @__PURE__ */ e(N, { onClick: c, buttonType: "ghost", className: `${s}__button`, children: a }),
17
+ t
9
18
  ] });
10
19
  };
11
20
  export {
12
- h as default
21
+ f as default
13
22
  };
@@ -5,44 +5,76 @@
5
5
 
6
6
  .#{$px}-footer {
7
7
  background-color: $off-white;
8
- border-top: 1px solid $keyline-gray;
9
8
  margin: $spacing-lg 0 0;
10
9
  width: 100%;
11
10
 
12
- ul {
13
- list-style: none;
14
- padding: 0;
15
- }
16
-
17
- &__navigation {
18
- background-color: $white;
19
- padding: $spacing-md $spacing-md $spacing-sm;
20
- text-align: right;
21
-
22
- @include media($size-md) {
23
- padding: $spacing-md $spacing-lg $spacing-sm;
24
- }
25
-
26
- @include media($size-lg) {
27
- padding: $spacing-md $spacing-xl $spacing-sm;
11
+ .#{$px}-accordion {
12
+ border-bottom: 1px solid #eae8e4;
13
+ border-top: 1px solid #eae8e4;
14
+ width: 100%;
15
+
16
+ &-item {
17
+ padding: $spacing-sm 0 0;
18
+
19
+ ul {
20
+ li {
21
+ a {
22
+ font-size: 0.875rem;
23
+ font-weight: 500;
24
+ line-height: 1.875rem;
25
+
26
+ &:hover {
27
+ text-decoration: underline;
28
+ }
29
+ }
30
+ }
31
+ }
32
+
33
+ &-label {
34
+ opacity: 1;
35
+ padding: 0 0 0.5rem;
36
+
37
+ @include media($size-sm) {
38
+ cursor: unset;
39
+ }
40
+
41
+ &__text {
42
+ color: $pure-black;
43
+ font-family: $Distinct;
44
+ font-size: 1rem;
45
+ font-weight: 600;
46
+ }
47
+ }
48
+
49
+ &__border-bottom {
50
+ border-bottom: 1px solid #eae8e4;
51
+ }
28
52
  }
53
+ }
29
54
 
30
- ul {
31
- display: inline-flex;
32
- flex-wrap: wrap;
33
- gap: $spacing-md;
34
- justify-content: center;
35
- list-style: none;
36
- padding: 0;
55
+ @include media($size-sm) {
56
+ .#{$px}-accordion {
57
+ border-bottom: 0;
58
+ border-top: 0;
59
+ display: flex;
60
+ width: 100%;
61
+
62
+ &-item {
63
+ border-bottom: 0;
64
+ flex: 1;
65
+ max-width: 18rem;
66
+ padding: $spacing-sm;
67
+
68
+ &-label__icon {
69
+ display: none;
70
+ }
71
+ }
37
72
  }
73
+ }
38
74
 
39
- a,
40
- button {
41
- @include text('cta-sm');
42
- @include bodyText;
43
-
44
- cursor: pointer;
45
- }
75
+ ul {
76
+ list-style: none;
77
+ padding: 0;
46
78
  }
47
79
 
48
80
  &__content {
@@ -88,10 +120,25 @@
88
120
  align-items: center;
89
121
  background-color: $white;
90
122
  display: flex;
123
+ flex-direction: column;
124
+ font-size: 1rem;
125
+ gap: 1rem;
91
126
 
92
- // font-size: 0.875rem;
93
127
  // height: 2.125rem;
94
128
  justify-content: center;
95
129
  padding: $spacing-xsm 0;
130
+
131
+ h1 {
132
+ margin-top: $spacing-md;
133
+ }
134
+ }
135
+
136
+ .#{$px}-split-panel {
137
+ @include media($size-sm) {
138
+ & > :last-child {
139
+ flex: unset;
140
+ width: unset;
141
+ }
142
+ }
96
143
  }
97
144
  }
@@ -3,30 +3,68 @@
3
3
  @import '../../type';
4
4
 
5
5
  .#{$px}-social {
6
- align-items: center;
7
6
  display: inline-flex;
8
7
  flex-direction: column;
8
+ padding: 0;
9
+ width: 100%;
10
+
11
+ @include media($size-sm) {
12
+ align-items: center;
13
+ padding: $spacing-sm;
14
+ width: unset;
15
+ }
16
+
17
+ &__button {
18
+ color: $pure-black;
19
+ font-size: 0.875rem;
20
+ justify-content: flex-start;
21
+ opacity: 1;
22
+ padding: 0;
23
+ text-decoration: underline;
24
+ white-space: nowrap;
25
+
26
+ @include media($size-sm) {
27
+ justify-content: center;
28
+ }
29
+
30
+ &:hover {
31
+ background-color: unset;
32
+ color: unset;
33
+ }
34
+
35
+ &:focus {
36
+ background-color: unset;
37
+ color: unset;
38
+ }
39
+ }
9
40
 
10
41
  @include media($size-sm) {
11
42
  align-items: flex-end;
12
43
  }
13
44
 
14
45
  &__header {
15
- @include text($heading3);
16
-
17
- margin-bottom: $spacing-xsm;
46
+ color: $pure-black;
47
+ font-family: $Distinct;
48
+ font-size: 1rem;
49
+ font-weight: 600;
50
+ margin-bottom: 0.75rem;
18
51
  }
19
52
 
20
53
  ul {
21
54
  align-items: center;
55
+ border-top: 1px solid #eae8e4;
22
56
  display: flex;
23
57
  gap: 0 1.25rem;
24
58
  list-style: none;
25
- margin: 0 0 $spacing-md;
26
- padding: 0;
59
+ margin: $spacing-md 0 $spacing-md;
60
+ padding: $spacing-md 0 0;
27
61
 
28
62
  @include media($size-sm) {
29
63
  gap: 0 1rem;
64
+ justify-content: flex-end;
65
+ margin: $spacing-sm 0 $spacing-md;
66
+ padding: $spacing-sm 0 0;
67
+ width: 100%;
30
68
  }
31
69
 
32
70
  li {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.33.0",
3
+ "version": "1.34.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"