@phillips/seldon 1.26.2 → 1.28.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 (52) hide show
  1. package/dist/assets/account_circle.svg.js +5 -0
  2. package/dist/assets/search.svg.js +5 -0
  3. package/dist/components/Header/Header.d.ts +26 -9
  4. package/dist/components/Header/Header.js +70 -24
  5. package/dist/components/Link/utils.d.ts +7 -1
  6. package/dist/components/Link/utils.js +6 -6
  7. package/dist/components/Navigation/Navigation.d.ts +10 -0
  8. package/dist/components/Navigation/Navigation.js +50 -0
  9. package/dist/components/Navigation/NavigationItem/NavigationItem.d.ts +30 -0
  10. package/dist/components/Navigation/NavigationItem/NavigationItem.js +35 -0
  11. package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.d.ts +9 -0
  12. package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +31 -0
  13. package/dist/components/Navigation/NavigationList/NavigationList.d.ts +9 -0
  14. package/dist/components/Navigation/NavigationList/NavigationList.js +32 -0
  15. package/dist/components/Search/Search.d.ts +7 -0
  16. package/dist/components/Search/Search.js +49 -0
  17. package/dist/components/UserManagement/UserManagement.d.ts +19 -0
  18. package/dist/components/UserManagement/UserManagement.js +52 -0
  19. package/dist/index.d.ts +7 -0
  20. package/dist/index.js +65 -51
  21. package/dist/pages/Page.js +38 -54
  22. package/dist/scss/_vars.scss +1 -1
  23. package/dist/scss/components/Button/_button.scss +3 -3
  24. package/dist/scss/components/DatePicker/_datePicker.scss +2 -2
  25. package/dist/scss/components/Footer/_footer.scss +4 -4
  26. package/dist/scss/components/Grid/_grid.scss +2 -2
  27. package/dist/scss/components/GridItem/_gridItem.scss +1 -1
  28. package/dist/scss/components/Header/_header.scss +144 -24
  29. package/dist/scss/components/HeroBanner/_heroBanner.scss +2 -2
  30. package/dist/scss/components/Input/_input.scss +2 -2
  31. package/dist/scss/components/Link/_link.scss +77 -3
  32. package/dist/scss/components/LinkBlock/_linkBlock.scss +2 -2
  33. package/dist/scss/components/LinkList/_linkList.scss +1 -1
  34. package/dist/scss/components/Modal/_modal.scss +2 -2
  35. package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +272 -0
  36. package/dist/scss/components/Navigation/NavigationItemTrigger/_navigationItemTrigger.scss +1 -0
  37. package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +96 -0
  38. package/dist/scss/components/Navigation/_navigation.scss +114 -0
  39. package/dist/scss/components/Row/_row.scss +1 -1
  40. package/dist/scss/components/Search/_search.scss +101 -0
  41. package/dist/scss/components/Social/_social.scss +3 -3
  42. package/dist/scss/components/SplitPanel/_splitPanel.scss +2 -2
  43. package/dist/scss/components/SplitPanel/_splitPanel.stories.scss +1 -1
  44. package/dist/scss/components/Subscribe/_subscribe.scss +4 -4
  45. package/dist/scss/components/Text/_text.scss +1 -1
  46. package/dist/scss/components/Toggle/_toggle.scss +2 -2
  47. package/dist/scss/components/UserManagement/_userManagement.scss +115 -0
  48. package/dist/scss/components/ViewingsList/_viewingsList.scss +3 -3
  49. package/dist/scss/styles.scss +6 -0
  50. package/dist/types/commonTypes.d.ts +4 -0
  51. package/dist/types/commonTypes.js +4 -0
  52. package/package.json +12 -12
@@ -0,0 +1,272 @@
1
+ @import '@phillips/seldon/dist/scss/vars';
2
+ @import '@phillips/seldon/dist/scss/typography';
3
+
4
+ .#{$px}-nav__item {
5
+ @media (max-width: #{$breakpoint-md - 1}) {
6
+ border-bottom: 1px solid #ccc;
7
+ max-width: 320px;
8
+ width: 100%;
9
+ }
10
+
11
+ @media (min-width: $breakpoint-md) {
12
+ align-items: center;
13
+ display: flex;
14
+ max-width: unset;
15
+
16
+ &:hover,
17
+ &:focus,
18
+ &:focus-within {
19
+ .#{$px}-nav__item--label {
20
+ color: $pure-black;
21
+ }
22
+ }
23
+
24
+ & & {
25
+ border-bottom: 1px solid #ccc;
26
+ }
27
+ }
28
+
29
+ & > button,
30
+ &--label {
31
+ /* TODO: Create token to handle these styles dynamically */
32
+ color: $soft-black;
33
+ display: block;
34
+ font-size: 0.8125rem;
35
+ font-weight: 500;
36
+ letter-spacing: 0.125rem;
37
+ line-height: 0.8125rem;
38
+ text-transform: uppercase;
39
+ width: 100%;
40
+
41
+ @media (max-width: #{$breakpoint-md - 1}) {
42
+ position: relative;
43
+ }
44
+ }
45
+
46
+ &--expanded ~ & &--label,
47
+ &--expanded ~ & > button {
48
+ @media (max-width: #{$breakpoint-md - 1}) {
49
+ display: none;
50
+
51
+ & > span::after {
52
+ content: '';
53
+ }
54
+ }
55
+ }
56
+
57
+ ul {
58
+ background: $pure-white;
59
+ opacity: 0;
60
+ overflow: hidden scroll;
61
+ position: absolute;
62
+ right: 0;
63
+ top: 0;
64
+ width: 307px;
65
+ z-index: -10;
66
+ }
67
+
68
+ @media (min-width: $breakpoint-md) {
69
+ ul {
70
+ align-content: start;
71
+ background: #f4f4f4;
72
+ height: auto;
73
+ left: 0;
74
+ max-height: 0;
75
+ min-height: 0;
76
+ opacity: 0;
77
+ overflow: hidden;
78
+ position: fixed;
79
+ top: 90px;
80
+ width: 100vw;
81
+ z-index: -1;
82
+
83
+ li {
84
+ display: flex;
85
+ justify-content: end;
86
+ opacity: 0;
87
+
88
+ button,
89
+ a,
90
+ p {
91
+ @media (min-width: $breakpoint-md) {
92
+ border: none;
93
+ }
94
+ }
95
+
96
+ span {
97
+ &--badge {
98
+ display: flex;
99
+ justify-content: flex-end;
100
+ }
101
+
102
+ &--label {
103
+ text-wrap: nowrap;
104
+ }
105
+ }
106
+ }
107
+ }
108
+
109
+ &:hover ul,
110
+ &--expanded:focus-within ul {
111
+ max-height: 100vh;
112
+ min-height: 227px;
113
+ opacity: 1;
114
+ padding: 3.75rem;
115
+ z-index: 1;
116
+
117
+ li {
118
+ opacity: 1;
119
+
120
+ ul li::after {
121
+ opacity: 0;
122
+ }
123
+ }
124
+ }
125
+ }
126
+
127
+ .#{$px}-nav__item-trigger > label::after {
128
+ @media (max-width: #{$breakpoint-md - 1}) {
129
+ content: '\203A';
130
+ display: inline-block;
131
+ font-size: 1.75rem;
132
+ font-weight: normal;
133
+ position: absolute;
134
+ right: 0;
135
+ top: 35%;
136
+ transform: translateY(-50%);
137
+ }
138
+
139
+ @media (min-width: $breakpoint-md) {
140
+ content: '';
141
+ }
142
+ }
143
+
144
+ &.#{$px}-nav__item--expanded ul {
145
+ opacity: 1;
146
+ z-index: 0;
147
+ }
148
+
149
+ & > a,
150
+ & > button,
151
+ & > p {
152
+ background-color: transparent;
153
+ display: flex;
154
+ padding: 0.625rem;
155
+ }
156
+
157
+ @media (max-width: #{$breakpoint-md - 1}) {
158
+ & > a:focus,
159
+ & > button:focus,
160
+ & > p:focus {
161
+ background-color: #f4f4f4;
162
+ }
163
+
164
+ &:hover {
165
+ & > a,
166
+ & > button,
167
+ & > p {
168
+ background-color: #f4f4f4;
169
+ }
170
+ }
171
+ }
172
+
173
+ @media (min-width: $breakpoint-md) {
174
+ position: relative;
175
+
176
+ &:not(ul ul li):hover::before {
177
+ content: '';
178
+ height: 100%;
179
+ position: absolute;
180
+ top: 0;
181
+ width: 100%;
182
+ }
183
+
184
+ &:not(ul ul li) a:focus,
185
+ &:not(ul ul li) button:focus,
186
+ &:not(ul ul li) p:focus {
187
+ background: #f4f4f4;
188
+ }
189
+
190
+ &:not(ul ul li)::after,
191
+ &:not(ul ul li a):focus::after,
192
+ &:not(ul ul li button):focus::after {
193
+ background: rgb(84, 84, 84);
194
+ content: '';
195
+ height: 2px;
196
+ left: 50%;
197
+ opacity: 0;
198
+ position: absolute;
199
+ top: 70%;
200
+ transform: translateX(-50%);
201
+ width: 0;
202
+ }
203
+
204
+ &:not(ul ul li):hover::after,
205
+ &:not(ul ul li) a:focus::after,
206
+ &:not(ul ul li) button:focus::after,
207
+ &:not(ul ul li) p:focus::after {
208
+ opacity: 1;
209
+ width: 85%;
210
+ }
211
+
212
+ .#{$px}-nav__list-item {
213
+ position: static;
214
+ z-index: 1;
215
+ }
216
+
217
+ & > .#{$px}-nav__list-item-trigger::before {
218
+ background: #f4f4f4;
219
+ content: '';
220
+ height: 2px;
221
+ left: 0;
222
+ opacity: 0;
223
+ position: absolute;
224
+ top: 100%;
225
+ width: 100%;
226
+ }
227
+
228
+ &:hover > .#{$px}-nav__item-trigger::before,
229
+ &:focus > .#{$px}-nav__item-trigger::before {
230
+ opacity: 1;
231
+ }
232
+ }
233
+ }
234
+
235
+ .#{$px}-nav__list__section {
236
+ &--large-cta {
237
+ margin-right: 1rem;
238
+
239
+ @media (max-width: #{$breakpoint-md - 1}) {
240
+ margin-right: 0;
241
+ }
242
+ .#{$px}-nav__item {
243
+ &--badge {
244
+ /* TODO: Create token to handle these styles dynamically */
245
+ align-items: center;
246
+ display: flex;
247
+ flex-wrap: wrap;
248
+ font-weight: 400;
249
+ justify-content: flex-end;
250
+ letter-spacing: 0.25rem;
251
+ line-height: 0.8125rem;
252
+ min-width: 25%;
253
+ text-align: right;
254
+ text-transform: uppercase;
255
+
256
+ @include pText(0.8125rem, $keyline-gray);
257
+
258
+ &:hover {
259
+ color: $keyline-gray;
260
+ }
261
+
262
+ @media (max-width: #{$breakpoint-md - 1}) {
263
+ /* TODO: Create token to handle these styles dynamically */
264
+ align-items: flex-start;
265
+ font-size: 0.6rem;
266
+ letter-spacing: 0.125rem;
267
+ min-width: 35%;
268
+ }
269
+ }
270
+ }
271
+ }
272
+ }
@@ -0,0 +1 @@
1
+ @import '@phillips/seldon/dist/scss/vars';
@@ -0,0 +1,96 @@
1
+ @import '@phillips/seldon/dist/scss/vars';
2
+
3
+ .#{$px}-nav__list {
4
+ display: flex;
5
+ justify-content: right;
6
+ list-style: none;
7
+ margin: 0;
8
+ padding: 0;
9
+ width: 100%;
10
+
11
+ @media (max-width: #{$breakpoint-md - 1}) {
12
+ flex-direction: column;
13
+ height: calc(100vh - 102px);
14
+ justify-content: left;
15
+ min-width: 330px;
16
+ overflow: scroll;
17
+ padding: 0.5rem;
18
+ transform: translateX(0%);
19
+ transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1) 0.1s;
20
+ }
21
+
22
+ &--expanded {
23
+ @media (max-width: #{$breakpoint-md - 1}) {
24
+ &:not(li ul) {
25
+ transform: translateX(-50%);
26
+ width: 200%;
27
+ }
28
+ }
29
+ }
30
+
31
+ & .#{$px}-nav__item > & {
32
+ display: grid;
33
+ grid-template-columns: 20% 20% 20% 20% 20%;
34
+
35
+ @media (max-width: #{$breakpoint-md - 1}) {
36
+ display: none;
37
+
38
+ &--expanded {
39
+ display: flex;
40
+ flex-direction: column;
41
+ }
42
+ }
43
+ }
44
+
45
+ &__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
+ @media (max-width: #{$breakpoint-md - 1}) {
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
+ @media (min-width: $breakpoint-md) {
89
+ height: 60px;
90
+ }
91
+ }
92
+
93
+ * {
94
+ cursor: pointer;
95
+ }
96
+ }
@@ -0,0 +1,114 @@
1
+ @import '@phillips/seldon/dist/scss/vars';
2
+
3
+ .#{$px}-nav {
4
+ background: $pure-white;
5
+ color: $soft-black;
6
+ height: 100%;
7
+ overflow: hidden;
8
+ padding-top: 4.5rem;
9
+ position: relative;
10
+ width: 100%;
11
+
12
+ @media (min-width: $breakpoint-md) {
13
+ display: flex;
14
+ flex-wrap: wrap;
15
+ overflow: visible;
16
+ padding-top: 0;
17
+ place-content: center right;
18
+ position: unset;
19
+ width: auto;
20
+ }
21
+
22
+ &--expanded &__label {
23
+ animation: 1s linear fade-in-out forwards;
24
+ }
25
+
26
+ &__label {
27
+ animation: 1s linear fade-in-out2 forwards;
28
+ font-size: 1.25rem;
29
+ padding-left: 0.625rem;
30
+ visibility: var(--visible);
31
+ }
32
+
33
+ & &__back-btn {
34
+ background-color: transparent;
35
+ cursor: pointer;
36
+ font-weight: 800;
37
+ height: 60px;
38
+ opacity: 0;
39
+ padding: 1rem;
40
+ position: absolute;
41
+ right: 0;
42
+ top: 0;
43
+ transition:
44
+ opacity 0s linear,
45
+ background-color 0.5s;
46
+ width: auto;
47
+ }
48
+
49
+ &--expanded &__back-btn {
50
+ opacity: 1;
51
+ transition:
52
+ opacity 0.5s linear 0.25s,
53
+ background-color 0.5s;
54
+ }
55
+
56
+ @media (min-width: $breakpoint-md) {
57
+ // Remove label and mobile buttons on larger screens
58
+ .#{$px}-nav__back-btn,
59
+ .#{$px}-nav__close-btn,
60
+ .#{$px}-nav__label {
61
+ display: none;
62
+ }
63
+ }
64
+
65
+ // Zero out default styles for possible children
66
+ button {
67
+ appearance: none;
68
+ background: none;
69
+ border: none;
70
+ color: inherit;
71
+ display: block;
72
+ margin: 0;
73
+ padding: 0;
74
+ text-align: left;
75
+ width: 100%;
76
+ }
77
+
78
+ &__back-btn:hover,
79
+ &__back-btn:focus,
80
+ &__close-btn:hover,
81
+ &__close-btn:focus {
82
+ background-color: #f4f4f4;
83
+ }
84
+ }
85
+
86
+ // Animations
87
+
88
+ @keyframes fade-in-out {
89
+ 0% {
90
+ opacity: 0;
91
+ }
92
+
93
+ 30% {
94
+ opacity: 0;
95
+ }
96
+
97
+ 100% {
98
+ opacity: 1;
99
+ }
100
+ }
101
+
102
+ @keyframes fade-in-out2 {
103
+ 0% {
104
+ opacity: 0;
105
+ }
106
+
107
+ 30% {
108
+ opacity: 0;
109
+ }
110
+
111
+ 100% {
112
+ opacity: 1;
113
+ }
114
+ }
@@ -1,4 +1,4 @@
1
- @import '../../_vars';
1
+ @import '@phillips/seldon/dist/scss/_vars';
2
2
 
3
3
  .#{$px}-row {
4
4
  // horizontal padding is fixed
@@ -0,0 +1,101 @@
1
+ @import '@phillips/seldon/dist/scss/vars';
2
+ @import '@phillips/seldon/dist/scss/typography';
3
+
4
+ .#{$px}-search {
5
+ align-items: center;
6
+ display: flex;
7
+ height: 60px;
8
+ justify-content: center;
9
+ padding: 0.47rem;
10
+
11
+ &__overlay {
12
+ background-color: rgba(0, 0, 0, 50%);
13
+ display: none;
14
+ height: 100%;
15
+ inset: 0;
16
+ position: fixed;
17
+ width: 100%;
18
+ z-index: 2;
19
+
20
+ &--active {
21
+ display: block;
22
+ & + .#{$px}-search__button {
23
+ z-index: 3;
24
+ }
25
+ }
26
+ }
27
+
28
+ &__button {
29
+ background: transparent;
30
+ border: none;
31
+ height: 18px;
32
+ margin: 0;
33
+ padding: 0;
34
+ width: 18px;
35
+
36
+ @media (max-width: #{$breakpoint-md - 1}) {
37
+ border: 2px solid black;
38
+ border-radius: 50%;
39
+ height: 35px;
40
+ padding: 0.125rem;
41
+ position: absolute;
42
+ right: 1rem;
43
+ width: 35px;
44
+ }
45
+
46
+ &__icon {
47
+ height: 100%;
48
+ width: 100%;
49
+ }
50
+ }
51
+
52
+ &__input-wrapper {
53
+ background: #323232;
54
+ color: $white;
55
+ display: flex;
56
+ height: 100px;
57
+ overflow: hidden;
58
+ position: absolute;
59
+ right: 0;
60
+ top: 60px;
61
+ transition: 0.5s ease;
62
+ width: 0;
63
+ z-index: 3;
64
+
65
+ @media (max-width: #{$breakpoint-md - 1}) {
66
+ top: 60px;
67
+ }
68
+
69
+ &--active {
70
+ width: 50%;
71
+
72
+ @media (max-width: #{$breakpoint-md - 1}) {
73
+ top: 60px;
74
+ width: 100%;
75
+ }
76
+ }
77
+
78
+ &__icon {
79
+ height: 24px;
80
+ left: 35px;
81
+ position: absolute;
82
+ top: 30px;
83
+ width: 24px;
84
+
85
+ path {
86
+ fill: $white;
87
+ }
88
+ }
89
+ .#{$px}-input__input {
90
+ background: #323232;
91
+ border-bottom: 1px solid white;
92
+ border-left: 0;
93
+ border-radius: unset;
94
+ border-right: 0;
95
+ border-top: 0;
96
+ color: white;
97
+ margin: 1rem 2rem;
98
+ padding: 1rem 2rem;
99
+ }
100
+ }
101
+ }
@@ -1,6 +1,6 @@
1
- @import '../../vars';
2
- @import '../../utils';
3
- @import '../../type';
1
+ @import '@phillips/seldon/dist/scss/vars';
2
+ @import '@phillips/seldon/dist/scss/utils';
3
+ @import '@phillips/seldon/dist/scss/type';
4
4
 
5
5
  .#{$px}-social {
6
6
  align-items: center;
@@ -1,5 +1,5 @@
1
- @import '../../vars';
2
- @import '../../utils';
1
+ @import '@phillips/seldon/dist/scss/vars';
2
+ @import '@phillips/seldon/dist/scss/utils';
3
3
 
4
4
  .#{$px}-split-panel {
5
5
  align-items: center;
@@ -1,4 +1,4 @@
1
- @import '../../vars';
1
+ @import '@phillips/seldon/dist/scss/vars';
2
2
 
3
3
  .split-panel-story {
4
4
  background-color: #f4f2f1;
@@ -1,7 +1,7 @@
1
- @import '../../vars';
2
- @import '../../utils';
3
- @import '../../type';
4
- @import '../../typography';
1
+ @import '@phillips/seldon/dist/scss/vars';
2
+ @import '@phillips/seldon/dist/scss/utils';
3
+ @import '@phillips/seldon/dist/scss/type';
4
+ @import '@phillips/seldon/dist/scss/typography';
5
5
 
6
6
  .#{$px}-subscribe {
7
7
  max-width: 30rem;
@@ -1,4 +1,4 @@
1
- @import '../../_vars';
1
+ @import '@phillips/seldon/dist/scss/_vars';
2
2
 
3
3
  .#{$px}-text {
4
4
  @each $variant in $text-tokens {
@@ -1,5 +1,5 @@
1
- @import '../../vars';
2
- @import '../../utils';
1
+ @import '@phillips/seldon/dist/scss/vars';
2
+ @import '@phillips/seldon/dist/scss/utils';
3
3
 
4
4
  $toggleBaseWidth: 3rem;
5
5
  $inline: #{$px}-input--inline;