@phillips/seldon 1.260.0 → 1.262.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 (73) hide show
  1. package/dist/_virtual/index10.cjs +1 -1
  2. package/dist/_virtual/index10.js +2 -2
  3. package/dist/_virtual/index12.js +2 -2
  4. package/dist/_virtual/index13.js +2 -2
  5. package/dist/_virtual/index9.cjs +1 -1
  6. package/dist/_virtual/index9.js +2 -2
  7. package/dist/components/Banner/Banner.cjs +1 -0
  8. package/dist/components/Banner/Banner.d.ts +27 -0
  9. package/dist/components/Banner/Banner.js +70 -0
  10. package/dist/components/Banner/Banner.stories.d.ts +65 -0
  11. package/dist/components/Banner/Banner.test.d.ts +1 -0
  12. package/dist/components/Banner/index.d.ts +2 -0
  13. package/dist/components/Banner/types.cjs +1 -0
  14. package/dist/components/Banner/types.d.ts +8 -0
  15. package/dist/components/Banner/types.js +5 -0
  16. package/dist/components/Breadcrumb/Breadcrumb.cjs +1 -1
  17. package/dist/components/Breadcrumb/Breadcrumb.js +20 -19
  18. package/dist/components/Input/utils.cjs +1 -1
  19. package/dist/components/Input/utils.js +4 -2
  20. package/dist/components/Navigation/Navigation.cjs +1 -1
  21. package/dist/components/Navigation/Navigation.js +30 -29
  22. package/dist/components/Navigation/NavigationItemWithSubmenu/NavigationItemWithSubmenu.cjs +1 -1
  23. package/dist/components/Navigation/NavigationItemWithSubmenu/NavigationItemWithSubmenu.js +28 -27
  24. package/dist/components/ProgressBar/ProgressBar.cjs +1 -0
  25. package/dist/components/ProgressBar/ProgressBar.d.ts +17 -0
  26. package/dist/components/ProgressBar/ProgressBar.js +70 -0
  27. package/dist/components/ProgressBar/ProgressBar.stories.d.ts +32 -0
  28. package/dist/components/ProgressBar/ProgressBar.test.d.ts +1 -0
  29. package/dist/components/ProgressBar/index.d.ts +3 -0
  30. package/dist/components/ProgressBar/utils.cjs +1 -0
  31. package/dist/components/ProgressBar/utils.d.ts +5 -0
  32. package/dist/components/ProgressBar/utils.js +15 -0
  33. package/dist/components/ProgressBar/utils.test.d.ts +1 -0
  34. package/dist/components/Text/types.cjs +1 -1
  35. package/dist/components/Text/types.d.ts +1 -0
  36. package/dist/components/Text/types.js +1 -1
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.d.ts +2 -0
  39. package/dist/index.js +251 -240
  40. package/dist/node_modules/ics/dist/index.cjs +1 -1
  41. package/dist/node_modules/ics/dist/index.js +1 -1
  42. package/dist/node_modules/ics/dist/schema/index.cjs +1 -1
  43. package/dist/node_modules/ics/dist/schema/index.js +1 -1
  44. package/dist/node_modules/ics/dist/utils/index.cjs +1 -1
  45. package/dist/node_modules/ics/dist/utils/index.js +1 -1
  46. package/dist/node_modules/prop-types/node_modules/react-is/index.cjs +1 -1
  47. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  48. package/dist/patterns/AccountPageHeader/AccountPageHeader.cjs +1 -1
  49. package/dist/patterns/AccountPageHeader/AccountPageHeader.js +27 -26
  50. package/dist/patterns/FiltersInline/SubFilterDropdown.cjs +1 -1
  51. package/dist/patterns/FiltersInline/SubFilterDropdown.js +38 -37
  52. package/dist/patterns/LanguageSelector/LanguageSelector.cjs +1 -1
  53. package/dist/patterns/LanguageSelector/LanguageSelector.js +31 -30
  54. package/dist/patterns/SaleCard/SaleCard.cjs +1 -1
  55. package/dist/patterns/SaleCard/SaleCard.js +19 -18
  56. package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.cjs +1 -1
  57. package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +70 -66
  58. package/dist/providers/SeldonProvider/utils.d.ts +1 -1
  59. package/dist/scss/_type.scss +6 -0
  60. package/dist/scss/_vars.scss +6 -1
  61. package/dist/scss/_vars.scss.cjs +7 -2
  62. package/dist/scss/_vars.scss.js +7 -2
  63. package/dist/scss/componentStyles.scss +2 -0
  64. package/dist/scss/components/Banner/_banner.scss +185 -0
  65. package/dist/scss/components/ProgressBar/_progressBar.scss +94 -0
  66. package/dist/scss/patterns/SaleHeaderBanner/_saleHeaderBanner.scss +10 -16
  67. package/dist/site-furniture/Header/Header.cjs +1 -1
  68. package/dist/site-furniture/Header/Header.js +15 -14
  69. package/dist/utils/constants.cjs +1 -1
  70. package/dist/utils/constants.d.ts +7 -0
  71. package/dist/utils/constants.js +7 -4
  72. package/dist/utils/index.d.ts +1 -1
  73. package/package.json +1 -1
@@ -1,79 +1,83 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as H } from "react";
3
- import { getCommonProps as R } from "../../utils/index.js";
4
- import D from "../../_virtual/index.js";
5
- import u from "../../components/Countdown/Countdown.js";
6
- import F from "../../components/SeldonImage/SeldonImage.js";
7
- import { AuctionStatus as O } from "../../types/commonTypes.js";
2
+ import { forwardRef as R } from "react";
3
+ import { getCommonProps as D } from "../../utils/index.js";
4
+ import F from "../../_virtual/index.js";
5
+ import p from "../../components/Countdown/Countdown.js";
6
+ import O from "../../components/SeldonImage/SeldonImage.js";
7
+ import { AuctionStatus as V } from "../../types/commonTypes.js";
8
8
  import { TextVariants as r } from "../../components/Text/types.js";
9
- import l from "../../components/Text/Text.js";
9
+ import t from "../../components/Text/Text.js";
10
10
  import q from "../../components/PageContentWrapper/PageContentWrapper.js";
11
11
  import { SSRMediaQuery as f } from "../../providers/SeldonProvider/utils.js";
12
- const z = H(
12
+ import n from "../../components/Banner/Banner.js";
13
+ import { Breakpoints as u } from "../../utils/constants.js";
14
+ import { BannerVariants as I, BannerMediaSize as L } from "../../components/Banner/types.js";
15
+ const Q = R(
13
16
  ({
14
- auctionEndTime: t,
15
- auctionTitle: s,
16
- badgeText: o,
17
- imageSrcUrl: N,
18
- imageSrcSet: g,
19
- imageSizes: v,
20
- imageLoading: $,
21
- imageFetchPriority: S,
17
+ auctionEndTime: l,
18
+ auctionTitle: o,
19
+ badgeText: s,
20
+ imageSrcUrl: v,
21
+ imageSrcSet: N,
22
+ imageSizes: g,
23
+ imageLoading: S,
24
+ imageFetchPriority: $,
22
25
  location: b,
23
- countdownTimerLabel: M,
24
- countdownFormatDuration: w,
25
- auctionState: B,
26
- occurrenceInformation: k,
27
- onClick: I,
28
- children: x,
29
- className: C,
26
+ countdownTimerLabel: B,
27
+ countdownFormatDuration: M,
28
+ auctionState: w,
29
+ occurrenceInformation: C,
30
+ onClick: T,
31
+ children: k,
32
+ className: x,
30
33
  footerElement: P,
31
- headerLabel: j,
32
- showTimer: c,
33
- getCurrentDateTime: y,
34
- ...n
35
- }, m) => {
36
- const { className: a, ...d } = R(n, "SaleHeaderBanner"), _ = B === O.live, h = {
37
- endDateTime: t,
38
- label: M,
39
- formatDurationStr: w,
40
- getCurrentDateTime: y
34
+ headerLabel: y,
35
+ showTimer: m,
36
+ getCurrentDateTime: j,
37
+ ...c
38
+ }, z) => {
39
+ const { className: a, ...A } = D(c, "SaleHeaderBanner"), d = w === V.live, _ = {
40
+ endDateTime: l,
41
+ label: B,
42
+ formatDurationStr: M,
43
+ getCurrentDateTime: j
41
44
  };
42
- return /* @__PURE__ */ i("div", { ...d, className: D(a, C), ...n, ref: m, children: [
43
- _ && t && c ? /* @__PURE__ */ e(f.Media, { lessThan: "md", children: /* @__PURE__ */ e("div", { className: `${a}__stack__countdown`, children: /* @__PURE__ */ e(u, { ...h, showBottomBorder: !1, centerAlign: !0 }) }) }) : null,
44
- /* @__PURE__ */ e(
45
- F,
46
- {
47
- aspectRatio: "16/9",
48
- src: N,
49
- alt: String(s),
50
- objectFit: "cover",
51
- className: `${a}__image`,
52
- srcSet: g,
53
- sizes: v,
54
- loading: $,
55
- fetchPriority: S
56
- }
57
- ),
58
- /* @__PURE__ */ e(q, { className: `${a}__stack-wrapper`, ...d, ...n, ref: m, children: /* @__PURE__ */ i("div", { className: `${a}__stack`, children: [
59
- _ && t && c ? /* @__PURE__ */ e(f.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ e("div", { className: `${a}__stack__countdown`, children: /* @__PURE__ */ e(u, { ...h, centerAlign: !0 }) }) }) : null,
60
- /* @__PURE__ */ e(l, { variant: r.labelMedium, className: `${a}__header-label`, children: j }),
61
- /* @__PURE__ */ e(l, { className: `${a}__title`, variant: r.headingLarge, children: s }),
62
- o && /* @__PURE__ */ e(l, { variant: r.badge, className: `${a}__badge`, children: o }),
63
- /* @__PURE__ */ e(l, { variant: r.labelMedium, className: `${a}__location`, children: b }),
64
- /* @__PURE__ */ i("div", { className: `${a}__occurrence-details`, children: [
65
- k.map(({ date: p, occurrenceLabel: A }) => /* @__PURE__ */ i("div", { className: `${a}__occurrence-details-text`, children: [
66
- /* @__PURE__ */ e(l, { variant: r.labelMedium, children: A }),
67
- /* @__PURE__ */ e(l, { variant: r.labelMedium, className: `${a}__date`, children: p })
68
- ] }, String(p))),
69
- x
70
- ] }),
71
- P
72
- ] }) })
45
+ return /* @__PURE__ */ i("div", { ...A, className: F(a, x), ...c, ref: z, children: [
46
+ d && l && m ? /* @__PURE__ */ e(f.Media, { lessThan: u.md, children: /* @__PURE__ */ e("div", { className: `${a}__stack__countdown`, children: /* @__PURE__ */ e(p, { ..._, showBottomBorder: !1, centerAlign: !0 }) }) }) : null,
47
+ /* @__PURE__ */ i(n, { variant: I.top, children: [
48
+ /* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(q, { children: /* @__PURE__ */ i("div", { className: `${a}__stack`, children: [
49
+ d && l && m ? /* @__PURE__ */ e(f.Media, { greaterThanOrEqual: u.md, children: /* @__PURE__ */ e("div", { className: `${a}__stack__countdown`, children: /* @__PURE__ */ e(p, { ..._, centerAlign: !0 }) }) }) : null,
50
+ /* @__PURE__ */ e(n.Eyebrow, { variant: r.labelMedium, className: `${a}__header-label`, children: y }),
51
+ /* @__PURE__ */ e(n.Title, { variant: r.headingLarge, element: "h1", className: `${a}__title`, children: o }),
52
+ s && /* @__PURE__ */ e(t, { variant: r.badge, className: `${a}__badge`, children: s }),
53
+ /* @__PURE__ */ e(t, { variant: r.labelMedium, className: `${a}__location`, children: b }),
54
+ /* @__PURE__ */ i("div", { className: `${a}__occurrence-details`, children: [
55
+ C.map(({ date: h, occurrenceLabel: H }) => /* @__PURE__ */ i("div", { className: `${a}__occurrence-details-text`, children: [
56
+ /* @__PURE__ */ e(t, { variant: r.labelMedium, children: H }),
57
+ /* @__PURE__ */ e(t, { variant: r.labelMedium, className: `${a}__date`, children: h })
58
+ ] }, String(h))),
59
+ k
60
+ ] }),
61
+ P
62
+ ] }) }) }),
63
+ /* @__PURE__ */ e(n.Media, { size: L.half, className: `${a}__image`, children: /* @__PURE__ */ e(
64
+ O,
65
+ {
66
+ aspectRatio: "16/9",
67
+ src: v,
68
+ alt: String(o),
69
+ objectFit: "cover",
70
+ srcSet: N,
71
+ sizes: g,
72
+ loading: S,
73
+ fetchPriority: $
74
+ }
75
+ ) })
76
+ ] })
73
77
  ] });
74
78
  }
75
79
  );
76
- z.displayName = "SaleHeaderBanner";
80
+ Q.displayName = "SaleHeaderBanner";
77
81
  export {
78
- z as default
82
+ Q as default
79
83
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * Used to hide or show components based on the current breakpoint in a SSR friendly way
3
3
  */
4
- export declare const SSRMediaQuery: import('@artsy/fresnel/dist/Media').CreateMediaResults<"sm" | "md" | "lg" | "xsm" | "snw-mobile", never>;
4
+ export declare const SSRMediaQuery: import('@artsy/fresnel/dist/Media').CreateMediaResults<"snw-mobile" | "xsm" | "sm" | "md" | "lg", never>;
5
5
  export declare const ssrMediaQueryStyle: string;
@@ -334,6 +334,12 @@
334
334
  @include label-styles($font-size: $font-size-badge-medium);
335
335
  }
336
336
 
337
+ @if $token == $stringSmall {
338
+ @include label-styles($font-size: $string-size3, $font-weight: 600);
339
+
340
+ line-height: $string-line-height-size3;
341
+ }
342
+
337
343
  @if $token == $linkStylised {
338
344
  @include link-styles($font-size: $font-size-link-stylised, $text-transform: uppercase, $text-decoration: unset);
339
345
  @include DistinctDisplay;
@@ -1,3 +1,5 @@
1
+ @use 'sass:color';
2
+
1
3
  // prefix
2
4
  $px: seldon;
3
5
 
@@ -108,6 +110,8 @@ $bg-soft: #f9f8f7;
108
110
  $bg-border: #eae9e6;
109
111
  $bg-inverted: #000;
110
112
  $bg-overlay: rgba(0, 0, 0, 50%);
113
+ $bg-progress-bar: color.adjust(#0065fc, $alpha: -0.8);
114
+ $bg-progress-bar-mobile: #ebf3ff;
111
115
 
112
116
  // Status
113
117
  $success-default: #00cc39;
@@ -240,11 +244,12 @@ $linkMedium: 'linkMedium';
240
244
  $linkSmall: 'linkSmall';
241
245
  $badgeSmall: 'badgeSmall';
242
246
  $badgeMedium: 'badgeMedium';
247
+ $stringSmall: 'stringSmall';
243
248
  $text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5,
244
249
  $title1, $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink,
245
250
  $snwHeaderLink, $snwHeadingHero1, $snwHeadingHero2, $displayMedium, $displaySmall, $headingLarge, $headingMedium,
246
251
  $headingSmall, $headingExtraSmall, $bodyLarge, $bodyMedium, $bodySmall, $labelLarge, $labelMedium, $labelSmall,
247
- $linkStylised, $linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium;
252
+ $linkStylised, $linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium, $stringSmall;
248
253
 
249
254
  ////////////////////////
250
255
  /// Breakpoint TOKENS to be used for min-width comparisons, make sure they match BREAKPOINTS in constants.ts
@@ -1,4 +1,6 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=`// prefix
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=`@use 'sass:color';
2
+
3
+ // prefix
2
4
  $px: seldon;
3
5
 
4
6
  // TODO: make design team to follow something like https://tailwindcss.com/docs/font-size
@@ -108,6 +110,8 @@ $bg-soft: #f9f8f7;
108
110
  $bg-border: #eae9e6;
109
111
  $bg-inverted: #000;
110
112
  $bg-overlay: rgba(0, 0, 0, 50%);
113
+ $bg-progress-bar: color.adjust(#0065fc, $alpha: -0.8);
114
+ $bg-progress-bar-mobile: #ebf3ff;
111
115
 
112
116
  // Status
113
117
  $success-default: #00cc39;
@@ -240,11 +244,12 @@ $linkMedium: 'linkMedium';
240
244
  $linkSmall: 'linkSmall';
241
245
  $badgeSmall: 'badgeSmall';
242
246
  $badgeMedium: 'badgeMedium';
247
+ $stringSmall: 'stringSmall';
243
248
  $text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5,
244
249
  $title1, $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink,
245
250
  $snwHeaderLink, $snwHeadingHero1, $snwHeadingHero2, $displayMedium, $displaySmall, $headingLarge, $headingMedium,
246
251
  $headingSmall, $headingExtraSmall, $bodyLarge, $bodyMedium, $bodySmall, $labelLarge, $labelMedium, $labelSmall,
247
- $linkStylised, $linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium;
252
+ $linkStylised, $linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium, $stringSmall;
248
253
 
249
254
  ////////////////////////
250
255
  /// Breakpoint TOKENS to be used for min-width comparisons, make sure they match BREAKPOINTS in constants.ts
@@ -1,4 +1,6 @@
1
- const n = `// prefix
1
+ const n = `@use 'sass:color';
2
+
3
+ // prefix
2
4
  $px: seldon;
3
5
 
4
6
  // TODO: make design team to follow something like https://tailwindcss.com/docs/font-size
@@ -108,6 +110,8 @@ $bg-soft: #f9f8f7;
108
110
  $bg-border: #eae9e6;
109
111
  $bg-inverted: #000;
110
112
  $bg-overlay: rgba(0, 0, 0, 50%);
113
+ $bg-progress-bar: color.adjust(#0065fc, $alpha: -0.8);
114
+ $bg-progress-bar-mobile: #ebf3ff;
111
115
 
112
116
  // Status
113
117
  $success-default: #00cc39;
@@ -240,11 +244,12 @@ $linkMedium: 'linkMedium';
240
244
  $linkSmall: 'linkSmall';
241
245
  $badgeSmall: 'badgeSmall';
242
246
  $badgeMedium: 'badgeMedium';
247
+ $stringSmall: 'stringSmall';
243
248
  $text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5,
244
249
  $title1, $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink,
245
250
  $snwHeaderLink, $snwHeadingHero1, $snwHeadingHero2, $displayMedium, $displaySmall, $headingLarge, $headingMedium,
246
251
  $headingSmall, $headingExtraSmall, $bodyLarge, $bodyMedium, $bodySmall, $labelLarge, $labelMedium, $labelSmall,
247
- $linkStylised, $linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium;
252
+ $linkStylised, $linkLarge, $linkMedium, $linkSmall, $badgeSmall, $badgeMedium, $stringSmall;
248
253
 
249
254
  ////////////////////////
250
255
  /// Breakpoint TOKENS to be used for min-width comparisons, make sure they match BREAKPOINTS in constants.ts
@@ -7,6 +7,7 @@
7
7
  @use './vars' as *;
8
8
 
9
9
  // ⚛️ Components
10
+ @use 'components/Banner/banner';
10
11
  @use 'components/Button/button';
11
12
  @use 'components/Card/card';
12
13
  @use 'components/IconButton/iconButton';
@@ -63,6 +64,7 @@
63
64
  @use 'components/ProgressIndicator/progressIndicator';
64
65
  @use 'components/DescriptiveRadioButton/descriptiveRadioButton';
65
66
  @use 'components/DescriptiveRadioButtonGroup/descriptiveRadioButtonGroup';
67
+ @use 'components/ProgressBar/progressBar';
66
68
 
67
69
  // Patterns
68
70
  @use 'patterns/HeroBanner/heroBanner';
@@ -0,0 +1,185 @@
1
+ @use '../../allPartials' as *;
2
+
3
+ .#{$px}-banner {
4
+ min-width: 0;
5
+ width: 100%;
6
+
7
+ &__inner {
8
+ align-items: center;
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: 16px;
12
+
13
+ // Stacked: always show media above copy; at snw-mobile+ DOM order controls left/right in the row.
14
+ > .#{$px}-banner__media {
15
+ order: 0;
16
+ }
17
+
18
+ > .#{$px}-banner__column-gap {
19
+ order: 1;
20
+ }
21
+
22
+ > .#{$px}-banner__body {
23
+ order: 2;
24
+ }
25
+
26
+ @include media($breakpoint-snw-mobile) {
27
+ flex-direction: row;
28
+
29
+ > .#{$px}-banner__media,
30
+ > .#{$px}-banner__column-gap,
31
+ > .#{$px}-banner__body {
32
+ order: unset;
33
+ }
34
+ }
35
+ }
36
+
37
+ &__media {
38
+ flex-shrink: 0;
39
+ position: relative;
40
+ width: 100%;
41
+
42
+ @include media($breakpoint-snw-mobile) {
43
+ width: auto;
44
+
45
+ &--1-3 {
46
+ flex-basis: 33.333%;
47
+ }
48
+
49
+ &--1-2 {
50
+ flex-basis: 50%;
51
+ }
52
+ }
53
+ }
54
+
55
+ &__column-gap {
56
+ align-self: stretch;
57
+ background: $grey-50;
58
+ flex-shrink: 0;
59
+ margin: 0 $spacing-xsm;
60
+ width: 1px;
61
+ }
62
+
63
+ &__body {
64
+ display: flex;
65
+ flex-direction: column;
66
+ gap: $spacing-xsm;
67
+ min-width: 0;
68
+ width: 100%;
69
+ }
70
+
71
+ &__description {
72
+ -webkit-box-orient: vertical;
73
+ color: $text-supporting;
74
+ display: -webkit-box;
75
+ -webkit-line-clamp: 3;
76
+ line-clamp: 3;
77
+ overflow: hidden;
78
+
79
+ @include media($breakpoint-snw-mobile) {
80
+ -webkit-line-clamp: 2;
81
+ line-clamp: 2;
82
+ }
83
+ }
84
+
85
+ &__cta {
86
+ text-decoration: underline;
87
+ }
88
+
89
+ &__media-frame {
90
+ aspect-ratio: 16 / 9;
91
+ overflow: hidden;
92
+ width: 100%;
93
+ }
94
+
95
+ &__media-img {
96
+ display: block;
97
+ height: 100%;
98
+ object-fit: cover;
99
+ width: 100%;
100
+ }
101
+
102
+ &--inline {
103
+ border-bottom: 1px solid $grey-50;
104
+ border-top: 1px solid $grey-50;
105
+ padding: 16px;
106
+ }
107
+
108
+ &--top {
109
+ // Top-of-page banners: uses default `&__inner` gap ($spacing-sm). Full-width Fresnel slices (e.g. countdown).
110
+ .#{$px}-banner__body .fresnel-container {
111
+ width: 100%;
112
+ }
113
+ .#{$px}-banner__body {
114
+ justify-content: center;
115
+ padding-left: 0;
116
+
117
+ @include media($breakpoint-md) {
118
+ padding: $spacing-md 0;
119
+ padding-left: $spacing-lg;
120
+ }
121
+ }
122
+
123
+ .#{$px}-banner__inner {
124
+ align-items: stretch;
125
+ column-gap: 0;
126
+
127
+ @include media($breakpoint-snw-mobile) {
128
+ flex-direction: column;
129
+
130
+ > .#{$px}-banner__media {
131
+ order: 0;
132
+ }
133
+
134
+ > .#{$px}-banner__column-gap {
135
+ order: 1;
136
+ }
137
+
138
+ > .#{$px}-banner__body {
139
+ order: 2;
140
+ }
141
+ }
142
+
143
+ @include media($breakpoint-md) {
144
+ flex-direction: row;
145
+
146
+ > .#{$px}-banner__media,
147
+ > .#{$px}-banner__column-gap,
148
+ > .#{$px}-banner__body {
149
+ order: unset;
150
+ }
151
+ }
152
+ }
153
+
154
+ .#{$px}-banner__media {
155
+ @include media($breakpoint-snw-mobile) {
156
+ width: 100%;
157
+
158
+ &--1-3,
159
+ &--1-2 {
160
+ flex-basis: unset;
161
+ }
162
+ }
163
+
164
+ @include media($breakpoint-md) {
165
+ width: auto;
166
+
167
+ &--1-3 {
168
+ flex-basis: 33.333%;
169
+ }
170
+
171
+ &--1-2 {
172
+ flex-basis: 50%;
173
+ }
174
+ }
175
+ }
176
+
177
+ // Row layout: page margins inset copy from the media seam; remove inline-start padding
178
+ // so the stack aligns with the image edge (SaleHeaderBanner and similar).
179
+ @include media($breakpoint-md) {
180
+ .#{$px}-banner__body > .#{$px}-page-content-wrapper {
181
+ padding-inline-start: 0;
182
+ }
183
+ }
184
+ }
185
+ }
@@ -0,0 +1,94 @@
1
+ @use '../../allPartials' as *;
2
+ @use 'sass:color';
3
+
4
+ .#{$px}-progress-bar {
5
+ position: relative;
6
+ width: 100%;
7
+
8
+ &__track {
9
+ align-items: center;
10
+ background: $bg-progress-bar;
11
+ cursor: pointer;
12
+ display: flex;
13
+ height: 1rem;
14
+ overflow: visible;
15
+ position: relative;
16
+ width: 100%;
17
+ }
18
+
19
+ &__fill {
20
+ align-items: center;
21
+ background: $status-info;
22
+ bottom: 0;
23
+ color: $white;
24
+ display: flex;
25
+ justify-content: flex-end;
26
+ left: 0;
27
+ min-width: 0;
28
+ overflow: hidden;
29
+ padding-inline: $spacing-xsm;
30
+ position: absolute;
31
+ top: 0;
32
+ transition: width 250ms ease;
33
+ width: 0;
34
+ z-index: 1;
35
+ }
36
+
37
+ &__label {
38
+ align-items: center;
39
+ display: flex;
40
+ flex-shrink: 0;
41
+ height: 100%;
42
+ white-space: nowrap;
43
+ }
44
+
45
+ &__hover-tooltip {
46
+ background: $pure-white;
47
+ border-radius: $radius-sm;
48
+ box-shadow: 0 0.25rem 1rem color.adjust($pure-black, $alpha: -0.84);
49
+ left: 0;
50
+ max-width: calc(100% - #{$spacing-md});
51
+ padding: $spacing-sm;
52
+ pointer-events: none;
53
+ position: absolute;
54
+ top: calc(100%);
55
+ transform: translateX(-50%);
56
+ z-index: 4;
57
+ }
58
+
59
+ &__hover-tooltip-caret {
60
+ border-bottom: 0.5rem solid $pure-white;
61
+ border-left: 0.375rem solid transparent;
62
+ border-right: 0.375rem solid transparent;
63
+ display: block;
64
+ height: 0;
65
+ left: 50%;
66
+ position: absolute;
67
+ top: -0.5rem;
68
+ transform: translateX(-50%);
69
+ width: 0;
70
+ }
71
+
72
+ &__live-region {
73
+ border: 0;
74
+ clip: rect(0 0 0 0);
75
+ clip-path: inset(100%);
76
+ height: 1px;
77
+ overflow: hidden;
78
+ position: absolute;
79
+ white-space: nowrap;
80
+ width: 1px;
81
+ }
82
+
83
+ @media (max-width: calc($breakpoint-md - 1px)) {
84
+ &__track {
85
+ background: $bg-progress-bar-mobile;
86
+ height: 0.25rem;
87
+ }
88
+
89
+ &__label,
90
+ &__hover-tooltip {
91
+ display: none;
92
+ }
93
+ }
94
+ }
@@ -2,10 +2,18 @@
2
2
 
3
3
  .#{$px}-sale-header-banner {
4
4
  border-bottom: 1px solid $light-gray;
5
- display: flex;
6
- flex-direction: column;
7
5
  margin-bottom: $spacing-md;
8
6
 
7
+ @include media($breakpoint-md, $type: 'max') {
8
+ .#{$px}-banner__inner {
9
+ gap: 0;
10
+ }
11
+
12
+ &__stack {
13
+ padding: $spacing-md 0;
14
+ }
15
+ }
16
+
9
17
  &__header-label {
10
18
  margin-bottom: $spacing-xsm;
11
19
  }
@@ -16,30 +24,16 @@
16
24
  }
17
25
  }
18
26
 
19
- .fresnel-container {
20
- width: 100%;
21
- }
22
-
23
27
  .#{$px}-countdown {
24
28
  padding-top: var(--spacing-sm);
25
29
  }
26
30
 
27
- @include media($size-md, $type: 'min') {
28
- flex-direction: row-reverse;
29
-
30
- &__image,
31
- &__stack-wrapper {
32
- flex: 0 50%;
33
- }
34
- }
35
-
36
31
  &__stack {
37
32
  align-items: start;
38
33
  display: flex;
39
34
  flex-direction: column;
40
35
  height: 100%;
41
36
  justify-content: center;
42
- padding: $spacing-md 0;
43
37
 
44
38
  &__countdown {
45
39
  display: flex;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),o=require("../../_virtual/index.cjs"),t=require("react"),U=require("../../components/Icon/Icon.cjs"),E=require("../../components/Navigation/Navigation.cjs"),y=require("../../patterns/LanguageSelector/LanguageSelector.cjs"),j=require("../../patterns/UserManagement/UserManagement.cjs"),D=require("../../providers/SeldonProvider/utils.cjs"),n=require("../../utils/index.cjs"),F=require("./hooks.cjs"),G=require("./utils.cjs"),C=t.createContext(G.defaultHeaderContext),S=t.forwardRef(({logo:d=r.jsx(U.default,{icon:"PhillipsLogo"}),logoHref:$="/",className:H,children:i,toggleOpenText:M="Open Menu",toggleCloseText:q="Close Menu",logoText:O="Home Page",disabled:u,bannerRef:l,skipToContentId:h="main",skipLinkLabel:N="Skip to main content",...w},a)=>{const g=n.findChildrenOfType(i,j.default),T=t.isValidElement(g?.[0])?t.cloneElement(g[0],{disabled:u}):"",m=n.findChildrenOfType(i,y.default),p=t.isValidElement(m?.[0])?t.cloneElement(m[0],{disabled:u}):"",[f,k]=t.useState(!1),P=n.findChildrenOfType(i,E.default),R=n.findChildrenExcludingTypes(i,[E.default,j.default,y.default]),{closeMenu:z,handleMenuToggle:I,isMenuOpen:c,toggleText:V}=F.useMobileMenu({toggleOpenText:M,toggleCloseText:q}),[A,L]=t.useState(null),[x,v]=t.useState(l?.current?l.current.clientHeight:0),b=t.useRef(null);t.useEffect(()=>{const e=l?.current;if(!e)return;v(e.clientHeight);const s=new window.ResizeObserver(()=>{v(e.clientHeight)});return s.observe(e),()=>{s.disconnect()}},[l,x]),t.useEffect(()=>{const e=b.current;if(!e)return;const s=()=>{const Q=e.offsetHeight;document.documentElement.style.setProperty("--header-height",`${Q}px`)};s();const _=new window.ResizeObserver(s);return _.observe(e),()=>{_.disconnect()}},[]);const B=t.useCallback(e=>{b.current=e,typeof a=="function"?a(e):a&&(a.current=e)},[a]);return r.jsxs("header",{...w,className:o.default(`${n.px}-header`,H),ref:B,style:{"--banner-height":`${x}px`},children:[h&&r.jsx("a",{href:`#${h}`,className:`${n.px}-header__skip-link`,"data-testid":"skip-to-content",children:N}),r.jsxs("div",{className:`${n.px}-header__top-row`,children:[r.jsx(D.SSRMediaQuery.Media,{greaterThanOrEqual:"md",children:p}),r.jsxs("button",{"aria-label":V,"data-testid":"mobile-menu-toggle",type:"button",onClick:I,className:o.default(`${n.px}-header__toggle-btn`,{[`${n.px}-header__toggle-btn--open`]:c}),children:[r.jsx("span",{})," "]}),r.jsx("a",{href:$,"aria-label":O,"data-testid":"header-logo",className:`${n.px}-header__logo`,children:typeof d=="object"?d:r.jsx("img",{alt:"Phillips","data-testid":"header-logo-img",src:d})}),T]}),r.jsx("div",{className:o.default(`${n.px}-header__nav`,{[`${n.px}-header__nav--closed`]:!c}),children:r.jsxs(C.Provider,{value:{activeSubmenuId:A,setActiveSubmenuId:L,isMenuOpen:c,isSearchExpanded:f,setIsSearchExpanded:k,closeMenu:z},children:[t.Children.map(P,e=>t.isValidElement(e)?t.cloneElement(e,{children:[...t.Children.toArray(e.props.children),p]}):e),R]})}),r.jsx("div",{className:o.default(`${n.px}-header__overlay`,{[`${n.px}-header__overlay--active`]:f})})]})});S.displayName="Header";exports.HeaderContext=C;exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),o=require("../../_virtual/index.cjs"),t=require("react"),U=require("../../components/Icon/Icon.cjs"),E=require("../../components/Navigation/Navigation.cjs"),y=require("../../patterns/LanguageSelector/LanguageSelector.cjs"),j=require("../../patterns/UserManagement/UserManagement.cjs"),D=require("../../providers/SeldonProvider/utils.cjs"),n=require("../../utils/index.cjs"),F=require("./hooks.cjs"),G=require("./utils.cjs"),J=require("../../utils/constants.cjs"),C=t.createContext(G.defaultHeaderContext),S=t.forwardRef(({logo:c=r.jsx(U.default,{icon:"PhillipsLogo"}),logoHref:$="/",className:H,children:i,toggleOpenText:M="Open Menu",toggleCloseText:q="Close Menu",logoText:O="Home Page",disabled:u,bannerRef:l,skipToContentId:h="main",skipLinkLabel:N="Skip to main content",...w},a)=>{const g=n.findChildrenOfType(i,j.default),k=t.isValidElement(g?.[0])?t.cloneElement(g[0],{disabled:u}):"",m=n.findChildrenOfType(i,y.default),p=t.isValidElement(m?.[0])?t.cloneElement(m[0],{disabled:u}):"",[f,T]=t.useState(!1),P=n.findChildrenOfType(i,E.default),R=n.findChildrenExcludingTypes(i,[E.default,j.default,y.default]),{closeMenu:z,handleMenuToggle:I,isMenuOpen:d,toggleText:V}=F.useMobileMenu({toggleOpenText:M,toggleCloseText:q}),[A,B]=t.useState(null),[x,v]=t.useState(l?.current?l.current.clientHeight:0),b=t.useRef(null);t.useEffect(()=>{const e=l?.current;if(!e)return;v(e.clientHeight);const s=new window.ResizeObserver(()=>{v(e.clientHeight)});return s.observe(e),()=>{s.disconnect()}},[l,x]),t.useEffect(()=>{const e=b.current;if(!e)return;const s=()=>{const Q=e.offsetHeight;document.documentElement.style.setProperty("--header-height",`${Q}px`)};s();const _=new window.ResizeObserver(s);return _.observe(e),()=>{_.disconnect()}},[]);const L=t.useCallback(e=>{b.current=e,typeof a=="function"?a(e):a&&(a.current=e)},[a]);return r.jsxs("header",{...w,className:o.default(`${n.px}-header`,H),ref:L,style:{"--banner-height":`${x}px`},children:[h&&r.jsx("a",{href:`#${h}`,className:`${n.px}-header__skip-link`,"data-testid":"skip-to-content",children:N}),r.jsxs("div",{className:`${n.px}-header__top-row`,children:[r.jsx(D.SSRMediaQuery.Media,{greaterThanOrEqual:J.Breakpoints.md,children:p}),r.jsxs("button",{"aria-label":V,"data-testid":"mobile-menu-toggle",type:"button",onClick:I,className:o.default(`${n.px}-header__toggle-btn`,{[`${n.px}-header__toggle-btn--open`]:d}),children:[r.jsx("span",{})," "]}),r.jsx("a",{href:$,"aria-label":O,"data-testid":"header-logo",className:`${n.px}-header__logo`,children:typeof c=="object"?c:r.jsx("img",{alt:"Phillips","data-testid":"header-logo-img",src:c})}),k]}),r.jsx("div",{className:o.default(`${n.px}-header__nav`,{[`${n.px}-header__nav--closed`]:!d}),children:r.jsxs(C.Provider,{value:{activeSubmenuId:A,setActiveSubmenuId:B,isMenuOpen:d,isSearchExpanded:f,setIsSearchExpanded:T,closeMenu:z},children:[t.Children.map(P,e=>t.isValidElement(e)?t.cloneElement(e,{children:[...t.Children.toArray(e.props.children),p]}):e),R]})}),r.jsx("div",{className:o.default(`${n.px}-header__overlay`,{[`${n.px}-header__overlay--active`]:f})})]})});S.displayName="Header";exports.HeaderContext=C;exports.default=S;