@phillips/seldon 1.40.0 → 1.41.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 (32) hide show
  1. package/dist/components/HeroBanner/HeroBanner.js +21 -21
  2. package/dist/components/Link/Link.js +23 -24
  3. package/dist/components/Link/types.d.ts +3 -16
  4. package/dist/components/Link/types.js +6 -2
  5. package/dist/components/Link/utils.d.ts +2 -18
  6. package/dist/components/Link/utils.js +4 -6
  7. package/dist/components/LinkBlock/LinkBlock.js +8 -8
  8. package/dist/components/Navigation/NavigationItem/NavigationItem.d.ts +1 -1
  9. package/dist/components/Navigation/NavigationItem/NavigationItem.js +28 -20
  10. package/dist/components/Text/types.d.ts +5 -8
  11. package/dist/components/Text/types.js +1 -1
  12. package/dist/components/Text/utils.js +4 -7
  13. package/dist/components/Video/Video.d.ts +23 -0
  14. package/dist/components/Video/Video.js +26 -0
  15. package/dist/index.d.ts +2 -1
  16. package/dist/index.js +7 -5
  17. package/dist/scss/_type.scss +29 -62
  18. package/dist/scss/_vars.scss +59 -51
  19. package/dist/scss/componentStyles.scss +1 -0
  20. package/dist/scss/components/HeroBanner/_heroBanner.scss +12 -29
  21. package/dist/scss/components/Link/_link.scss +29 -89
  22. package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +41 -92
  23. package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +2 -49
  24. package/dist/scss/components/Navigation/_navigation.scss +1 -3
  25. package/dist/scss/components/Row/_row.scss +4 -0
  26. package/dist/scss/components/Search/_search.scss +1 -1
  27. package/dist/scss/components/Text/_text.scss +4 -2
  28. package/dist/scss/components/UserManagement/_userManagement.scss +0 -8
  29. package/dist/scss/components/Video/_video.scss +17 -0
  30. package/dist/utils/index.d.ts +2 -1
  31. package/dist/utils/index.js +7 -7
  32. 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
  }
@@ -52,7 +52,7 @@
52
52
  overflow: hidden;
53
53
  position: absolute;
54
54
  right: 0;
55
- top: calc($header-height + $user-management-height);
55
+ top: $header-submenu-top;
56
56
  transition: 0.5s ease;
57
57
  width: 0;
58
58
  z-index: 3;
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.40.0",
3
+ "version": "1.41.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"
@@ -34,8 +34,9 @@
34
34
  "clean:stories": "rimraf './storybook-static'",
35
35
  "create-component": "node --no-warnings --loader ts-node/esm .template/scripts/createComponent.ts",
36
36
  "format": "prettier . --write",
37
- "lint": "tsc --noEmit && eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 && npm run lint:styles",
37
+ "lint": "tsc --noEmit && eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 && npm run lint:styles && npm run lint:md",
38
38
  "lint:styles": "stylelint \"src/**/*.scss\" --fix",
39
+ "lint:md": "markdownlint \"src/**/*.{md,mdx}\" --fix",
39
40
  "prepare": "husky install"
40
41
  },
41
42
  "dependencies": {
@@ -85,6 +86,7 @@
85
86
  "eslint-plugin-react-refresh": "^0.4.9",
86
87
  "eslint-plugin-storybook": "^0.8.0",
87
88
  "husky": "^9.1.4",
89
+ "markdownlint-cli": "^0.41.0",
88
90
  "prettier": "3.3.3",
89
91
  "react": "^18.3.1",
90
92
  "react-docgen-typescript": "^2.2.2",