@phillips/seldon 1.40.0 → 1.42.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 (38) hide show
  1. package/dist/assets/loading_spinner.svg.js +7 -0
  2. package/dist/components/HeroBanner/HeroBanner.js +21 -21
  3. package/dist/components/Link/Link.js +23 -24
  4. package/dist/components/Link/types.d.ts +3 -16
  5. package/dist/components/Link/types.js +6 -2
  6. package/dist/components/Link/utils.d.ts +2 -18
  7. package/dist/components/Link/utils.js +4 -6
  8. package/dist/components/LinkBlock/LinkBlock.js +8 -8
  9. package/dist/components/Navigation/NavigationItem/NavigationItem.d.ts +1 -1
  10. package/dist/components/Navigation/NavigationItem/NavigationItem.js +28 -20
  11. package/dist/components/Search/Search.d.ts +1 -5
  12. package/dist/components/Search/Search.js +112 -94
  13. package/dist/components/Search/SearchResults/SearchResults.d.ts +8 -6
  14. package/dist/components/Search/SearchResults/SearchResults.js +17 -13
  15. package/dist/components/Text/types.d.ts +5 -8
  16. package/dist/components/Text/types.js +1 -1
  17. package/dist/components/Text/utils.js +4 -7
  18. package/dist/components/Video/Video.d.ts +23 -0
  19. package/dist/components/Video/Video.js +26 -0
  20. package/dist/index.d.ts +2 -1
  21. package/dist/index.js +7 -5
  22. package/dist/scss/_type.scss +29 -62
  23. package/dist/scss/_vars.scss +59 -51
  24. package/dist/scss/componentStyles.scss +2 -0
  25. package/dist/scss/components/HeroBanner/_heroBanner.scss +12 -29
  26. package/dist/scss/components/Link/_link.scss +29 -89
  27. package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +41 -92
  28. package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +2 -49
  29. package/dist/scss/components/Navigation/_navigation.scss +1 -3
  30. package/dist/scss/components/Row/_row.scss +4 -0
  31. package/dist/scss/components/Search/SearchResults/_searchResults.scss +61 -0
  32. package/dist/scss/components/Search/_search.scss +81 -101
  33. package/dist/scss/components/Text/_text.scss +4 -2
  34. package/dist/scss/components/UserManagement/_userManagement.scss +0 -8
  35. package/dist/scss/components/Video/_video.scss +17 -0
  36. package/dist/utils/index.d.ts +2 -1
  37. package/dist/utils/index.js +7 -7
  38. package/package.json +4 -2
@@ -1,8 +1,9 @@
1
1
  @use '../../../allPartials' as *;
2
2
 
3
3
  .#{$px}-nav__item {
4
+ background: $pure-white;
5
+
4
6
  @include isHeaderMobile {
5
- border-bottom: 1px solid #ccc;
6
7
  max-width: 320px;
7
8
  width: 100%;
8
9
  }
@@ -11,30 +12,32 @@
11
12
  align-items: center;
12
13
  display: flex;
13
14
  max-width: unset;
15
+ }
14
16
 
15
- &:hover,
16
- &:focus,
17
- &:focus-within {
18
- .#{$px}-nav__item--label {
19
- color: $pure-black;
20
- }
21
- }
17
+ & > button {
18
+ @include DistinctDisplay;
22
19
 
23
- & & {
24
- border-bottom: 1px solid #ccc;
20
+ text-transform: uppercase;
21
+
22
+ &:hover::after,
23
+ &:focus::after {
24
+ background: $pure-black;
25
+ content: '';
26
+ height: 1px;
27
+ left: 0;
28
+ position: absolute;
29
+ right: 0;
30
+ top: $header-height;
25
31
  }
26
32
  }
27
33
 
28
- & > button,
29
- &--label {
30
- /* TODO: Create token to handle these styles dynamically */
31
- color: $soft-black;
34
+ & > button {
35
+ @include DistinctDisplay;
36
+ @include text($snwHeaderLink);
37
+
32
38
  display: block;
33
- font-size: 0.8125rem;
34
- font-weight: 500;
35
- letter-spacing: 0.125rem;
36
- line-height: 0.8125rem;
37
- text-transform: uppercase;
39
+ position: relative;
40
+ white-space: nowrap;
38
41
  width: 100%;
39
42
 
40
43
  @include isHeaderMobile {
@@ -51,8 +54,9 @@
51
54
  }
52
55
  }
53
56
 
57
+ // Submenu
54
58
  ul {
55
- background: $off-white;
59
+ background: $pure-white;
56
60
  overflow: hidden scroll;
57
61
  position: absolute;
58
62
  right: 0;
@@ -64,20 +68,19 @@
64
68
  @include isHeaderDesktop {
65
69
  ul {
66
70
  align-content: start;
67
- background: #f4f4f4;
68
71
  height: auto;
69
72
  left: 0;
70
73
  max-height: 0;
71
74
  min-height: 0;
72
75
  overflow: hidden;
73
76
  position: fixed;
74
- top: 90px;
77
+ top: $header-submenu-top;
75
78
  width: 100%;
76
79
  z-index: -1;
77
80
 
78
81
  li {
79
- display: flex;
80
- justify-content: end;
82
+ display: inline;
83
+ white-space: nowrap;
81
84
 
82
85
  button,
83
86
  a,
@@ -86,17 +89,6 @@
86
89
  border: none;
87
90
  }
88
91
  }
89
-
90
- span {
91
- &--badge {
92
- display: flex;
93
- justify-content: flex-end;
94
- }
95
-
96
- &--label {
97
- text-wrap: nowrap;
98
- }
99
- }
100
92
  }
101
93
  }
102
94
 
@@ -130,26 +122,28 @@
130
122
  z-index: 0;
131
123
  }
132
124
 
133
- & > a,
134
- & > button,
135
- & > p {
125
+ & > button {
136
126
  background-color: transparent;
137
127
  border: 0;
138
128
  display: flex;
139
- padding: 0.625rem;
129
+ padding: 0.5rem 0.625rem calc(0.5rem + 2px); // 1 px so that the bottom border of the nav counts as part of the button
140
130
  }
141
131
 
142
132
  @include isHeaderMobile {
133
+ & > a,
134
+ & > button {
135
+ display: flex;
136
+ padding: 0.5rem 0.625rem;
137
+ }
138
+
143
139
  & > a:focus,
144
- & > button:focus,
145
- & > p:focus {
140
+ & > button:focus {
146
141
  background-color: #f4f4f4;
147
142
  }
148
143
 
149
144
  &:hover {
150
145
  & > a,
151
- & > button,
152
- & > p {
146
+ & > button {
153
147
  background-color: #f4f4f4;
154
148
  }
155
149
  }
@@ -164,26 +158,6 @@
164
158
  background: #f4f4f4;
165
159
  }
166
160
 
167
- &:not(ul ul li)::after,
168
- &:not(ul ul li a):focus::after,
169
- &:not(ul ul li button):focus::after {
170
- background: rgb(84, 84, 84);
171
- content: '';
172
- height: 2px;
173
- left: 50%;
174
- position: absolute;
175
- top: 70%;
176
- transform: translateX(-50%);
177
- width: 0;
178
- }
179
-
180
- &:not(ul ul li):hover::after,
181
- &:not(ul ul li) a:focus::after,
182
- &:not(ul ul li) button:focus::after,
183
- &:not(ul ul li) p:focus::after {
184
- width: 85%;
185
- }
186
-
187
161
  .#{$px}-nav__list-item {
188
162
  position: static;
189
163
  z-index: 1;
@@ -202,40 +176,15 @@
202
176
  }
203
177
 
204
178
  .#{$px}-nav__list__section {
179
+ display: flex;
180
+ flex-direction: column;
181
+ gap: $spacing-sm;
182
+
205
183
  &--large-cta {
206
184
  margin-right: 1rem;
207
185
 
208
186
  @include isHeaderMobile {
209
187
  margin-right: 0;
210
188
  }
211
- .#{$px}-nav__item {
212
- &--badge {
213
- /* TODO: Create token to handle these styles dynamically */
214
- align-items: center;
215
- display: flex;
216
- flex-wrap: wrap;
217
- font-weight: 400;
218
- justify-content: flex-end;
219
- letter-spacing: 0.25rem;
220
- line-height: 0.8125rem;
221
- min-width: 25%;
222
- text-align: right;
223
- text-transform: uppercase;
224
-
225
- @include pText(0.8125rem, $keyline-gray);
226
-
227
- &:hover {
228
- color: $keyline-gray;
229
- }
230
-
231
- @include isHeaderMobile {
232
- /* TODO: Create token to handle these styles dynamically */
233
- align-items: flex-start;
234
- font-size: 0.6rem;
235
- letter-spacing: 0.125rem;
236
- min-width: 35%;
237
- }
238
- }
239
- }
240
189
  }
241
190
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  .#{$px}-nav__list {
4
4
  display: flex;
5
- justify-content: right;
5
+ justify-content: center;
6
6
  list-style: none;
7
7
  margin: 0;
8
8
  padding: 0;
@@ -29,9 +29,6 @@
29
29
  }
30
30
 
31
31
  & .#{$px}-nav__item > & {
32
- display: grid;
33
- grid-template-columns: 20% 20% 20% 20% 20%;
34
-
35
32
  @include isHeaderMobile {
36
33
  display: none;
37
34
 
@@ -43,50 +40,6 @@
43
40
  }
44
41
 
45
42
  &__section {
46
- &--large-cta {
47
- grid-column: 1 / span 4;
48
- height: fit-content;
49
-
50
- .#{$px}-nav__item:first-child {
51
- a {
52
- padding-top: 0;
53
- }
54
- }
55
-
56
- .#{$px}-nav__item:last-child {
57
- justify-content: flex-end;
58
- &:has(> .#{$px}-link--navLinkSm) {
59
- border-bottom: none;
60
- padding-bottom: 0;
61
- }
62
- .#{$px}-link--navLinkSm {
63
- .#{$px}-nav__item--label {
64
- color: $cta-blue;
65
- }
66
- }
67
- }
68
- }
69
-
70
- &--small-cta {
71
- display: grid;
72
- grid-column: 4 / span 2;
73
- height: fit-content;
74
-
75
- @include isHeaderMobile {
76
- margin-top: 2rem;
77
- }
78
- }
79
-
80
- &--large-cta + &--small-cta {
81
- display: grid;
82
- grid-column: 5 / span 1;
83
- height: fit-content;
84
- }
85
- }
86
-
87
- > li:not(.#{$px}-user-management) {
88
- @include isHeaderDesktop {
89
- height: 60px;
90
- }
43
+ width: 100%;
91
44
  }
92
45
  }
@@ -1,8 +1,7 @@
1
1
  @use '../../allPartials' as *;
2
2
 
3
3
  .#{$px}-nav {
4
- background: $off-white;
5
- color: $soft-black;
4
+ background: $pure-white;
6
5
  height: 100%;
7
6
  overflow: hidden;
8
7
  padding-top: 4.5rem;
@@ -10,7 +9,6 @@
10
9
  width: 100%;
11
10
 
12
11
  @include isHeaderDesktop {
13
- background: $pure-white;
14
12
  display: flex;
15
13
  flex-wrap: wrap;
16
14
  overflow: visible;
@@ -4,4 +4,8 @@
4
4
  // horizontal padding is fixed
5
5
  padding-left: $spacing-lg;
6
6
  padding-right: $spacing-lg;
7
+
8
+ * .#{$px}-text:last-child {
9
+ margin-bottom: 0;
10
+ }
7
11
  }
@@ -0,0 +1,61 @@
1
+ @use '../../../allPartials' as *;
2
+
3
+ .#{$px}-search__results {
4
+ align-items: flex-start;
5
+ border-bottom: 1px solid $light-gray;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 0.625rem;
9
+ padding: 0.75rem 0 1.5625rem;
10
+ position: absolute;
11
+ top: $header-height;
12
+ width: 100%;
13
+
14
+ &-container {
15
+ background: $white;
16
+ display: flex;
17
+ flex-direction: column;
18
+ font-family: Montserrat, sans-serif;
19
+ gap: $spacing-sm;
20
+ width: 100%;
21
+ }
22
+ }
23
+
24
+ .#{$px}-search {
25
+ &__result {
26
+ display: flex;
27
+
28
+ &:last-child {
29
+ border-bottom: none;
30
+
31
+ a span p {
32
+ text-transform: uppercase;
33
+ }
34
+ }
35
+
36
+ p {
37
+ @include pText(0.875rem, $pure-black);
38
+
39
+ font-weight: 400;
40
+ line-height: 1.25rem;
41
+ text-transform: capitalize;
42
+ }
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
+ }
61
+ }
@@ -1,74 +1,91 @@
1
1
  @use '../../allPartials' as *;
2
2
 
3
3
  .#{$px}-search {
4
- align-items: center;
4
+ align-content: center;
5
5
  display: flex;
6
+ flex-wrap: wrap;
7
+ gap: $spacing-md;
6
8
  height: $header-height;
7
- justify-content: center;
8
- padding: 0.47rem;
9
+ padding: $spacing-sm $spacing-sm;
10
+ position: relative;
9
11
 
10
- &__overlay {
11
- background-color: rgba(0, 0, 0, 50%);
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 {
12
27
  display: none;
13
- height: 100%;
14
- inset: 0;
15
- position: fixed;
16
- width: 100%;
17
- z-index: 2;
18
28
 
19
- &--active {
20
- display: block;
21
- & + .#{$px}-search__button {
22
- z-index: 3;
23
- }
29
+ @include isHeaderMobile {
30
+ align-self: flex-start;
31
+ display: flex;
32
+ flex-wrap: wrap;
33
+ margin: 0;
24
34
  }
25
35
  }
26
36
 
27
37
  &__button {
28
- background: transparent;
38
+ background: $pure-white;
29
39
  border: none;
30
- height: 18px;
40
+ border-bottom: 1px solid transparent;
41
+ height: $header-height;
31
42
  margin: 0;
32
43
  padding: 0;
33
- width: 18px;
44
+ position: absolute;
45
+ right: $spacing-sm;
46
+ top: 0;
47
+ width: 1.5rem;
48
+ z-index: 4;
34
49
 
35
- @include isHeaderMobile {
36
- border: 2px solid black;
37
- border-radius: 50%;
38
- height: 35px;
39
- padding: 0.125rem;
40
- position: absolute;
41
- right: 1rem;
42
- width: 35px;
50
+ &--close {
51
+ border-bottom: 1px solid $pure-black;
43
52
  }
44
53
 
45
- &__icon {
54
+ svg {
46
55
  height: 100%;
47
56
  width: 100%;
48
57
  }
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
+ }
49
74
  }
50
75
 
51
76
  &__form {
77
+ display: flex;
52
78
  overflow: hidden;
53
79
  position: absolute;
54
- right: 0;
55
- top: calc($header-height + $user-management-height);
80
+ right: $spacing-sm;
81
+ top: 0; // calc($header-height + $user-management-height);
56
82
  transition: 0.5s ease;
57
83
  width: 0;
58
84
  z-index: 3;
59
85
 
60
- @include isHeaderMobile {
61
- top: $header-height;
62
- }
63
-
64
86
  &--active {
65
87
  overflow: visible;
66
- width: 50%;
67
-
68
- @include isHeaderMobile {
69
- top: $header-height;
70
- width: 100%;
71
- }
88
+ width: calc(100% - (2 * $spacing-sm));
72
89
 
73
90
  .#{$px}-search__results {
74
91
  display: flex;
@@ -77,72 +94,35 @@
77
94
  }
78
95
  }
79
96
 
80
- &__input-wrapper {
81
- background: #323232;
82
- color: $white;
97
+ &__content-wrapper {
98
+ background: $white;
99
+ color: $soft-black;
83
100
  display: flex;
84
- height: 100px;
85
101
  position: relative;
86
- z-index: 3;
87
-
88
- &__icon {
89
- height: 24px;
90
- left: 35px;
91
- position: absolute;
92
- top: 30px;
93
- width: 24px;
94
-
95
- path {
96
- fill: $white;
97
- }
98
- }
99
- .#{$px}-input__input {
100
- background: #323232;
101
- border-bottom: 1px solid white;
102
- border-left: 0;
103
- border-radius: unset;
104
- border-right: 0;
105
- border-top: 0;
106
- color: white;
107
- margin: 1rem 2rem;
108
- padding: 1rem 2rem;
109
- }
110
- }
111
-
112
- &__results {
113
- background: $soft-black;
114
- display: none;
115
- padding: 1rem 2rem;
116
- position: absolute;
117
- top: 100px;
118
102
  width: 100%;
119
- }
120
-
121
- &__result {
122
- border-bottom: 1px solid $white;
123
- display: flex;
124
- padding: 0.625rem 0;
125
-
126
- &:last-child {
127
- border-bottom: none;
128
- }
129
-
130
- .phillips-link {
131
- &:hover {
132
- border-bottom: none;
133
- }
134
- }
135
-
136
- p {
137
- @include text($body3);
138
-
139
- color: $white;
140
- text-transform: none;
141
- }
103
+ z-index: 3;
142
104
 
143
- &:hover {
144
- p {
145
- color: $cta-blue;
105
+ .#{$px}-input {
106
+ &__input {
107
+ background: $white;
108
+ border: 0;
109
+ border-bottom: 1px solid $pure-black;
110
+ border-radius: unset;
111
+ color: $pure-black;
112
+ font-family: DistinctDisplay, sans-serif;
113
+
114
+ // Tokenize later
115
+ font-size: 0.875rem;
116
+ font-style: normal;
117
+ font-weight: 400;
118
+ height: $header-height;
119
+ line-height: 1.5rem;
120
+ margin: 0;
121
+ padding: $spacing-sm 0;
122
+
123
+ &:focus {
124
+ outline: none;
125
+ }
146
126
  }
147
127
  }
148
128
  }
@@ -10,7 +10,7 @@
10
10
 
11
11
  h1.#{$px}-text,
12
12
  blockquote.#{$px}-text {
13
- margin-bottom: $spacing-xl;
13
+ margin-bottom: $spacing-lg;
14
14
  }
15
15
 
16
16
  h2.#{$px}-text {
@@ -19,7 +19,9 @@ h2.#{$px}-text {
19
19
  h3.#{$px}-text {
20
20
  margin-bottom: $spacing-md;
21
21
  }
22
- h4.#{$px}-text {
22
+ h4.#{$px}-text,
23
+ h5.#{$px}-text,
24
+ h6.#{$px}-text {
23
25
  margin-bottom: $spacing-sm;
24
26
  }
25
27
  p.#{$px}-text {
@@ -2,7 +2,6 @@
2
2
 
3
3
  .#{$px}-user-management {
4
4
  align-items: center;
5
- background-color: #f4f4f4;
6
5
  display: flex;
7
6
  height: $user-management-height;
8
7
  justify-content: flex-end;
@@ -46,13 +45,6 @@
46
45
  @include isHeaderMobile {
47
46
  width: 100%;
48
47
  }
49
-
50
- & > span {
51
- color: $soft-black;
52
- font-size: 0.8125rem;
53
- font-weight: 500;
54
- letter-spacing: 0.125rem;
55
- }
56
48
  }
57
49
  }
58
50
 
@@ -0,0 +1,17 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-video {
4
+ aspect-ratio: var(--aspect-ratio);
5
+ display: block;
6
+ height: auto;
7
+ position: relative;
8
+ width: 100%;
9
+
10
+ &__iframe {
11
+ border: 0;
12
+ height: 100%;
13
+ inset: 0;
14
+ position: absolute;
15
+ width: 100%;
16
+ }
17
+ }
@@ -14,7 +14,8 @@ export declare enum PaddingTokens {
14
14
  sm = "sm",
15
15
  md = "md",
16
16
  lg = "lg",
17
- xl = "xl"
17
+ xl = "xl",
18
+ xxl = "xxl"
18
19
  }
19
20
  export declare const noOp: () => void;
20
21
  export interface InputProps {
@@ -1,7 +1,7 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { kebabCase as d } from "../node_modules/change-case/dist/index.js";
3
3
  import * as u from "react";
4
- const i = "phillips", v = ({ id: e, ...n }, a) => {
4
+ const i = "phillips", x = ({ id: e, ...n }, a) => {
5
5
  const t = d(a);
6
6
  return {
7
7
  ...n,
@@ -9,10 +9,10 @@ const i = "phillips", v = ({ id: e, ...n }, a) => {
9
9
  className: `${i}-${t}`
10
10
  };
11
11
  };
12
- var p = /* @__PURE__ */ ((e) => (e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e))(p || {});
13
- const g = () => {
12
+ var p = /* @__PURE__ */ ((e) => (e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e.xxl = "xxl", e))(p || {});
13
+ const v = () => {
14
14
  };
15
- function x({
15
+ function g({
16
16
  disabled: e = !1,
17
17
  id: n,
18
18
  invalid: a = !1,
@@ -47,8 +47,8 @@ export {
47
47
  N as encodeURLSearchParams,
48
48
  I as findChildrenOfType,
49
49
  w as generatePaddingClassName,
50
- v as getCommonProps,
51
- g as noOp,
50
+ x as getCommonProps,
51
+ v as noOp,
52
52
  i as px,
53
- x as useNormalizedInputProps
53
+ g as useNormalizedInputProps
54
54
  };