@phillips/seldon 1.47.0 → 1.49.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.
Files changed (46) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +15 -13
  2. package/dist/assets/PhillipsLogo.svg.js +1 -1
  3. package/dist/assets/close.svg.js +1 -1
  4. package/dist/components/Header/Header.d.ts +13 -4
  5. package/dist/components/Header/Header.js +53 -48
  6. package/dist/components/Header/utils.d.ts +9 -0
  7. package/dist/components/Header/utils.js +13 -0
  8. package/dist/components/Navigation/Navigation.js +35 -31
  9. package/dist/components/Navigation/NavigationList/NavigationList.d.ts +5 -1
  10. package/dist/components/Navigation/NavigationList/NavigationList.js +11 -7
  11. package/dist/components/Search/Search.js +121 -113
  12. package/dist/components/Search/SearchButton.d.ts +7 -0
  13. package/dist/components/Search/SearchButton.js +37 -0
  14. package/dist/components/Subscribe/Subscribe.js +12 -13
  15. package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +13 -0
  16. package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +7 -0
  17. package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +10 -0
  18. package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +8 -0
  19. package/dist/node_modules/dom-helpers/esm/addClass.js +7 -0
  20. package/dist/node_modules/dom-helpers/esm/hasClass.js +6 -0
  21. package/dist/node_modules/dom-helpers/esm/removeClass.js +9 -0
  22. package/dist/node_modules/lodash.debounce/index.js +3 -0
  23. package/dist/node_modules/prop-types/index.js +11 -8
  24. package/dist/node_modules/react-transition-group/esm/CSSTransition.js +207 -0
  25. package/dist/node_modules/react-transition-group/esm/Transition.js +336 -0
  26. package/dist/node_modules/react-transition-group/esm/TransitionGroupContext.js +5 -0
  27. package/dist/node_modules/react-transition-group/esm/config.js +6 -0
  28. package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +21 -0
  29. package/dist/node_modules/react-transition-group/esm/utils/reflow.js +6 -0
  30. package/dist/node_modules/usehooks-ts/dist/index.js +37 -0
  31. package/dist/scss/_vars.scss +3 -0
  32. package/dist/scss/componentStyles.scss +1 -0
  33. package/dist/scss/components/Drawer/_drawer.scss +1 -1
  34. package/dist/scss/components/Header/_header.scss +30 -3
  35. package/dist/scss/components/Input/_input.scss +1 -2
  36. package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +2 -2
  37. package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +14 -2
  38. package/dist/scss/components/Navigation/_navigation.scss +6 -16
  39. package/dist/scss/components/Search/SearchResults/_searchResults.scss +10 -19
  40. package/dist/scss/components/Search/_search.scss +52 -74
  41. package/dist/scss/components/Search/_searchButton.scss +41 -0
  42. package/dist/scss/components/Subscribe/_subscribe.scss +3 -14
  43. package/dist/utils/index.d.ts +1 -1
  44. package/dist/utils/index.js +1 -1
  45. package/package.json +5 -2
  46. package/dist/assets/loading_spinner.svg.js +0 -7
@@ -5,10 +5,25 @@
5
5
  background-color: $white;
6
6
  border-bottom: 1px solid rgba(0, 0, 0, 10%);
7
7
  display: flex;
8
- padding: $user-management-height $spacing-md 0; // save space for the user management
8
+ flex-direction: column;
9
9
  position: sticky;
10
10
  top: 0;
11
11
 
12
+ &__top-row {
13
+ align-items: center;
14
+ background-color: $pure-white;
15
+ display: flex;
16
+ height: $top-row-height;
17
+ justify-content: center;
18
+ padding-top: 1rem;
19
+ width: 100%;
20
+ z-index: 10;
21
+
22
+ @include isHeaderMobile {
23
+ height: $nav-height;
24
+ }
25
+ }
26
+
12
27
  @include isHeaderMobile {
13
28
  padding: 0;
14
29
  top: 0;
@@ -21,7 +36,7 @@
21
36
  border: none;
22
37
  cursor: pointer;
23
38
  display: flex;
24
- height: $header-height;
39
+ height: $nav-height;
25
40
  justify-content: center;
26
41
  left: 0;
27
42
  overflow: hidden;
@@ -86,6 +101,7 @@
86
101
 
87
102
  &__logo {
88
103
  margin: auto;
104
+ width: 11.65rem;
89
105
 
90
106
  @include isHeaderDesktop {
91
107
  margin: unset;
@@ -134,11 +150,15 @@
134
150
  transform: translateX(-100%);
135
151
 
136
152
  @include isHeaderDesktop {
137
- height: $header-height;
138
153
  position: relative;
139
154
  transform: unset;
140
155
  width: 100%;
141
156
  }
157
+ .#{$px}-nav__list-container {
158
+ display: flex;
159
+ height: $nav-height;
160
+ padding-right: $nav-height;
161
+ }
142
162
 
143
163
  &.#{$px}-header__nav--open {
144
164
  transform: translateX(0);
@@ -147,5 +167,12 @@
147
167
  transform: unset;
148
168
  }
149
169
  }
170
+
171
+ .#{$px}-nav__item {
172
+ .#{$px}-link--snwHeaderLink {
173
+ align-content: center;
174
+ height: 100%;
175
+ }
176
+ }
150
177
  }
151
178
  }
@@ -30,7 +30,7 @@ $lg: #{$px}-input--lg;
30
30
  border: 1px solid $keyline-gray;
31
31
  border-radius: 0.1875rem;
32
32
  font-size: 0.8125rem;
33
- margin-bottom: 0.5rem;
33
+ margin-bottom: 0.25rem;
34
34
  padding: 0.5rem;
35
35
 
36
36
  // width: 100%;
@@ -128,7 +128,6 @@ $lg: #{$px}-input--lg;
128
128
 
129
129
  .#{$px}-input__validation {
130
130
  animation: reveal 0.45s linear forwards;
131
- padding-bottom: 0.5rem;
132
131
  }
133
132
  }
134
133
 
@@ -27,7 +27,7 @@
27
27
  left: 0;
28
28
  position: absolute;
29
29
  right: 0;
30
- top: $header-height;
30
+ top: $nav-height;
31
31
  }
32
32
  }
33
33
 
@@ -74,7 +74,7 @@
74
74
  min-height: 0;
75
75
  overflow: hidden;
76
76
  position: fixed;
77
- top: $header-submenu-top;
77
+ top: $desktop-header-height;
78
78
  width: 100%;
79
79
  z-index: -1;
80
80
 
@@ -5,8 +5,11 @@
5
5
  justify-content: center;
6
6
  list-style: none;
7
7
  margin: 0;
8
+ opacity: 1;
8
9
  padding: 0;
9
- width: 100%;
10
+ position: relative;
11
+ top: 0;
12
+ transition: top 0.25s ease-in 0.1s;
10
13
 
11
14
  @include isHeaderMobile {
12
15
  flex-direction: column;
@@ -16,7 +19,7 @@
16
19
  overflow: auto;
17
20
  padding: 0.5rem;
18
21
  transform: translateX(0%);
19
- transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1) 0.1s;
22
+ transition: transform 0.3s ease-in 0.1s;
20
23
  }
21
24
 
22
25
  &--expanded {
@@ -28,6 +31,15 @@
28
31
  }
29
32
  }
30
33
 
34
+ &--offscreen {
35
+ opacity: 0;
36
+ top: -100%;
37
+ transition:
38
+ top 0.25s ease-in 0.1s,
39
+ opacity 0.25s ease-in;
40
+ z-index: 5;
41
+ }
42
+
31
43
  & .#{$px}-nav__item > & {
32
44
  @include isHeaderMobile {
33
45
  display: none;
@@ -2,22 +2,25 @@
2
2
 
3
3
  .#{$px}-nav {
4
4
  background: $pure-white;
5
+ flex-wrap: wrap;
5
6
  height: 100%;
6
7
  overflow: hidden;
7
8
  padding-top: 4.5rem;
8
9
  position: relative;
9
- width: 100%;
10
10
 
11
11
  @include isHeaderDesktop {
12
12
  display: flex;
13
- flex-wrap: wrap;
14
13
  overflow: visible;
15
14
  padding-top: 0;
16
- place-content: center right;
15
+ place-content: center center;
17
16
  position: unset;
18
17
  width: auto;
19
18
  }
20
19
 
20
+ &__list-container {
21
+ position: relative;
22
+ }
23
+
21
24
  &--expanded &__label {
22
25
  animation: 1s linear fade-in-out forwards;
23
26
  }
@@ -61,19 +64,6 @@
61
64
  }
62
65
  }
63
66
 
64
- // Zero out default styles for possible children
65
- button {
66
- appearance: none;
67
- background: none;
68
- border: none;
69
- color: inherit;
70
- display: block;
71
- margin: 0;
72
- padding: 0;
73
- text-align: left;
74
- width: 100%;
75
- }
76
-
77
67
  &__back-btn:hover,
78
68
  &__back-btn:focus,
79
69
  &__close-btn:hover,
@@ -2,13 +2,14 @@
2
2
 
3
3
  .#{$px}-search__results {
4
4
  align-items: flex-start;
5
+ background: $white;
5
6
  border-bottom: 1px solid $light-gray;
6
7
  display: flex;
7
8
  flex-direction: column;
8
9
  gap: 0.625rem;
9
- padding: 0.75rem 0 1.5625rem;
10
+ padding: $spacing-sm;
10
11
  position: absolute;
11
- top: $header-height;
12
+ top: $nav-height;
12
13
  width: 100%;
13
14
 
14
15
  &-container {
@@ -33,6 +34,13 @@
33
34
  }
34
35
  }
35
36
 
37
+ .#{$px}-link {
38
+ &--link {
39
+ border-bottom: 1px transparent solid;
40
+ color: $pure-black;
41
+ }
42
+ }
43
+
36
44
  p {
37
45
  @include pText(0.875rem, $pure-black);
38
46
 
@@ -40,22 +48,5 @@
40
48
  line-height: 1.25rem;
41
49
  text-transform: capitalize;
42
50
  }
43
-
44
- &:hover,
45
- &:focus,
46
- &:focus-within,
47
- &:active {
48
- p {
49
- color: $pure-black;
50
- text-decoration: underline;
51
- }
52
-
53
- .phillips-link {
54
- &--standalone {
55
- border-bottom: none !important;
56
- color: $pure-black;
57
- }
58
- }
59
- }
60
51
  }
61
52
  }
@@ -1,91 +1,39 @@
1
1
  @use '../../allPartials' as *;
2
2
 
3
3
  .#{$px}-search {
4
- align-content: center;
5
4
  display: flex;
6
- flex-wrap: wrap;
7
5
  gap: $spacing-md;
8
- height: $header-height;
9
- padding: $spacing-sm $spacing-sm;
10
- position: relative;
11
-
12
- &__input-status-icon {
13
- height: $header-height;
14
- position: absolute;
15
- right: $spacing-sm;
16
- top: 0;
17
- width: 2rem;
18
- z-index: 4;
19
-
20
- svg {
21
- height: 100%;
22
- width: 100%;
23
- }
24
- }
25
-
26
- .#{$px}-text--heading3 {
27
- display: none;
28
-
29
- @include isHeaderMobile {
30
- align-self: flex-start;
31
- display: flex;
32
- flex-wrap: wrap;
33
- margin: 0;
34
- }
6
+ height: $nav-height;
7
+ left: calc(100% - $nav-height);
8
+ min-width: 2.625rem;
9
+ position: absolute;
10
+ right: 0;
11
+ top: 0;
12
+ transition: left 0.25s ease-in;
13
+
14
+ &--active {
15
+ left: 0;
16
+ transition: left 0.25s ease-in 0.2s;
35
17
  }
36
18
 
37
- &__button {
38
- background: $pure-white;
39
- border: none;
40
- border-bottom: 1px solid transparent;
41
- height: $header-height;
42
- margin: 0;
43
- padding: 0;
44
- position: absolute;
45
- right: $spacing-sm;
46
- top: 0;
47
- width: 1.5rem;
48
- z-index: 4;
49
-
50
- &--close {
51
- border-bottom: 1px solid $pure-black;
52
- }
19
+ &__input-status-icon {
20
+ border-bottom: 1px solid $pure-black;
21
+ height: $nav-height;
22
+ width: $nav-height;
53
23
 
54
24
  svg {
55
25
  height: 100%;
56
26
  width: 100%;
57
27
  }
58
-
59
- &:hover,
60
- &:focus,
61
- &:focus-within,
62
- &:active {
63
- border-bottom: 1px solid $pure-black;
64
- cursor: pointer;
65
- }
66
-
67
- &__icon {
68
- pointer-events: none;
69
-
70
- path {
71
- fill: $pure-black;
72
- }
73
- }
74
28
  }
75
29
 
76
30
  &__form {
77
31
  display: flex;
78
32
  overflow: hidden;
79
- position: absolute;
80
- right: $spacing-sm;
81
- top: 0; // calc($header-height + $user-management-height);
82
- transition: 0.5s ease;
83
- width: 0;
84
- z-index: 3;
33
+ width: 100%;
85
34
 
86
35
  &--active {
87
36
  overflow: visible;
88
- width: calc(100% - (2 * $spacing-sm));
89
37
 
90
38
  .#{$px}-search__results {
91
39
  display: flex;
@@ -95,16 +43,29 @@
95
43
  }
96
44
 
97
45
  &__content-wrapper {
98
- background: $white;
99
46
  color: $soft-black;
100
47
  display: flex;
101
- position: relative;
48
+ justify-content: flex-end;
102
49
  width: 100%;
103
- z-index: 3;
104
50
 
105
51
  .#{$px}-input {
106
- &__input {
52
+ width: 100%;
53
+
54
+ &__validation {
55
+ display: none;
56
+ }
57
+
58
+ &-enter-active input {
107
59
  background: $white;
60
+
61
+ &::placeholder {
62
+ opacity: 1;
63
+ transition: opacity 0.75s ease-in;
64
+ }
65
+ }
66
+
67
+ &__input {
68
+ background: transparent;
108
69
  border: 0;
109
70
  border-bottom: 1px solid $pure-black;
110
71
  border-radius: unset;
@@ -115,15 +76,32 @@
115
76
  font-size: 0.875rem;
116
77
  font-style: normal;
117
78
  font-weight: 400;
118
- height: $header-height;
79
+ height: $nav-height;
119
80
  line-height: 1.5rem;
120
81
  margin: 0;
121
- padding: $spacing-sm 0;
82
+ padding: $spacing-sm 0 $spacing-sm $spacing-sm;
122
83
 
123
84
  &:focus {
124
85
  outline: none;
125
86
  }
87
+
88
+ &::placeholder {
89
+ opacity: 0;
90
+ }
126
91
  }
127
92
  }
128
93
  }
129
94
  }
95
+
96
+ .#{$px}-text--heading3 {
97
+ display: none;
98
+
99
+ @include isHeaderMobile {
100
+ align-items: center;
101
+ display: flex;
102
+ flex-wrap: wrap;
103
+ height: $nav-height;
104
+ margin: 0;
105
+ padding: 0 $spacing-sm;
106
+ }
107
+ }
@@ -0,0 +1,41 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-search__button {
4
+ align-items: center;
5
+ background: $pure-white;
6
+ border: none;
7
+ border-bottom: 1px solid transparent;
8
+ cursor: pointer;
9
+ display: flex;
10
+ height: $nav-height;
11
+ justify-content: center;
12
+ margin: 0;
13
+ padding: 0;
14
+ position: absolute;
15
+ right: 0;
16
+ top: 0;
17
+ width: $nav-height;
18
+
19
+ &--close {
20
+ border-bottom: 1px solid $pure-black;
21
+ }
22
+
23
+ svg {
24
+ height: 1.5rem;
25
+ width: 1.5rem;
26
+ }
27
+
28
+ &:hover,
29
+ &:focus-visible,
30
+ &:active {
31
+ border-bottom: 1px solid $pure-black;
32
+ }
33
+
34
+ &__icon {
35
+ pointer-events: none;
36
+
37
+ path {
38
+ fill: $pure-black;
39
+ }
40
+ }
41
+ }
@@ -11,7 +11,7 @@
11
11
  }
12
12
 
13
13
  &__blurb {
14
- @include text($body2);
14
+ @include text($body1);
15
15
 
16
16
  color: $pure-black;
17
17
  }
@@ -21,23 +21,12 @@
21
21
  }
22
22
 
23
23
  &__button {
24
- margin: $spacing-sm 0 $spacing-md;
24
+ margin: 0.25rem 0 $spacing-sm;
25
+ max-width: 240px;
25
26
  width: 100%;
26
-
27
- @include media($size-md) {
28
- width: 240px;
29
- }
30
27
  }
31
28
 
32
29
  &__privacy {
33
30
  @include text($body3);
34
-
35
- color: $pure-black;
36
- font-size: 0.75rem;
37
- margin-top: $spacing-sm;
38
-
39
- @include media($size-md) {
40
- margin-top: $spacing-xl;
41
- }
42
31
  }
43
32
  }
@@ -99,6 +99,6 @@ export declare const emailValidation: (email: string) => boolean;
99
99
  * @param inverse - Return children that are not of the specified type
100
100
  *
101
101
  */
102
- export declare const findChildrenOfType: (children: React.ReactNode, componentType?: React.ElementType, inverse?: boolean) => (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[] | null;
102
+ export declare const findChildrenOfType: <ComponentProps>(children: React.ReactNode, componentType?: React.ElementType, inverse?: boolean) => React.ReactElement<ComponentProps, string | React.JSXElementConstructor<any>>[] | null;
103
103
  export declare const encodeURLSearchParams: (url: string) => string;
104
104
  export {};
@@ -33,7 +33,7 @@ function w({
33
33
  };
34
34
  return l.invalid && (l.validation = /* @__PURE__ */ d("div", { className: `${o}-input__validation ${o}-${s}-input--invalid`, id: l.invalidId, children: n })), l.warn && (l.validation = /* @__PURE__ */ d("div", { className: `${o}-input__validation ${o}-${s}-input--warn`, id: l.warnId, children: m })), l;
35
35
  }
36
- const g = (/* @__PURE__ */ new Date()).getFullYear(), h = (e, r = "end", t = "vertical") => `${o}-padding-${t}-${e}-${r}`, I = (e) => /(.+)@(.+){2,}\.(.+){2,}/i.test(e), N = function(e, r, t = !1) {
36
+ const g = (/* @__PURE__ */ new Date()).getFullYear(), h = (e, r = "end", t = "vertical") => `${o}-padding-${t}-${e}-${r}`, I = (e) => /(.+)@(.+){2,}\.(.+){2,}/i.test(e), N = (e, r, t = !1) => {
37
37
  const n = u.Children.toArray(e).filter((a) => a && a.type === r && !t ? a : a && a.type !== r && t);
38
38
  return n.length > 0 ? n : null;
39
39
  }, R = (e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.47.0",
3
+ "version": "1.49.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"
@@ -49,7 +49,9 @@
49
49
  "dompurify": "^3.1.6",
50
50
  "flatpickr": "^4.6.13",
51
51
  "html-react-parser": "^5.1.12",
52
- "react-modal": "^3.16.1"
52
+ "react-modal": "^3.16.1",
53
+ "react-transition-group": "^4.4.5",
54
+ "usehooks-ts": "^3.1.0"
53
55
  },
54
56
  "devDependencies": {
55
57
  "@chromatic-com/storybook": "^1.6.1",
@@ -75,6 +77,7 @@
75
77
  "@types/react": "^18.3.3",
76
78
  "@types/react-dom": "^18.0.11",
77
79
  "@types/react-modal": "^3.16.3",
80
+ "@types/react-transition-group": "^4.4.11",
78
81
  "@typescript-eslint/eslint-plugin": "^5.62.0",
79
82
  "@typescript-eslint/parser": "^5.62.0",
80
83
  "@vitejs/plugin-react": "^4.3.1",