@phillips/seldon 1.79.3 → 1.81.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.
- package/dist/components/Countdown/Countdown.d.ts +36 -0
- package/dist/components/Countdown/Countdown.js +50 -0
- package/dist/components/Countdown/Countdown.stories.d.ts +19 -0
- package/dist/components/Countdown/Countdown.test.d.ts +1 -0
- package/dist/components/Countdown/Duration.d.ts +7 -0
- package/dist/components/Countdown/Duration.js +14 -0
- package/dist/components/Countdown/Duration.test.d.ts +1 -0
- package/dist/components/Countdown/index.d.ts +1 -0
- package/dist/components/Countdown/types.d.ts +4 -0
- package/dist/components/Countdown/types.js +4 -0
- package/dist/components/Text/types.d.ts +3 -1
- package/dist/components/Text/types.js +2 -2
- package/dist/components/Text/utils.js +6 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +146 -144
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +9 -0
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
- package/dist/node_modules/date-fns/constants.js +7 -0
- package/dist/node_modules/date-fns/constructFrom.js +8 -0
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +16 -0
- package/dist/node_modules/date-fns/differenceInDays.js +22 -0
- package/dist/node_modules/date-fns/differenceInHours.js +15 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +8 -0
- package/dist/node_modules/date-fns/differenceInMinutes.js +11 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js +10 -0
- package/dist/node_modules/date-fns/formatDuration.js +23 -0
- package/dist/node_modules/date-fns/isSameWeek.js +14 -0
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
- package/dist/node_modules/date-fns/locale/en-US.js +21 -0
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +70 -0
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js +21 -0
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +162 -0
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/match.js +108 -0
- package/dist/node_modules/date-fns/locale/zh-CN.js +21 -0
- package/dist/node_modules/date-fns/startOfDay.js +9 -0
- package/dist/node_modules/date-fns/startOfWeek.js +11 -0
- package/dist/node_modules/date-fns/toDate.js +8 -0
- package/dist/node_modules/exenv/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/patterns/HeroBanner/HeroBanner.d.ts +5 -1
- package/dist/patterns/HeroBanner/HeroBanner.js +24 -23
- package/dist/patterns/HeroBanner/HeroBanner.stories.d.ts +1 -1
- package/dist/patterns/SaleHeaderBanner/index.d.ts +0 -1
- package/dist/scss/_type.scss +12 -0
- package/dist/scss/_vars.scss +17 -1
- package/dist/scss/componentStyles.scss +2 -0
- package/dist/scss/components/Accordion/_accordion.scss +2 -2
- package/dist/scss/components/Countdown/_countdown.scss +25 -0
- package/dist/scss/components/Countdown/_duration.scss +13 -0
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +1 -1
- package/dist/scss/patterns/HeroBanner/_heroBanner.scss +11 -12
- package/dist/scss/patterns/SaleHeaderBanner/_saleHeaderBanner.scss +0 -11
- package/dist/scss/site-furniture/Header/_header.scss +1 -6
- package/dist/site-furniture/Header/Header.js +4 -4
- package/package.json +2 -1
- package/dist/patterns/SaleHeaderBanner/SaleHeaderCountdown.d.ts +0 -8
- package/dist/patterns/SaleHeaderBanner/SaleHeaderCountdown.js +0 -35
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { buildFormatLongFn as t } from "../../_lib/buildFormatLongFn.js";
|
|
2
|
+
const m = {
|
|
3
|
+
full: "y'年'M'月'd'日' EEEE",
|
|
4
|
+
long: "y'年'M'月'd'日'",
|
|
5
|
+
medium: "yyyy-MM-dd",
|
|
6
|
+
short: "yy-MM-dd"
|
|
7
|
+
}, d = {
|
|
8
|
+
full: "zzzz a h:mm:ss",
|
|
9
|
+
long: "z a h:mm:ss",
|
|
10
|
+
medium: "a h:mm:ss",
|
|
11
|
+
short: "a h:mm"
|
|
12
|
+
}, a = {
|
|
13
|
+
full: "{{date}} {{time}}",
|
|
14
|
+
long: "{{date}} {{time}}",
|
|
15
|
+
medium: "{{date}} {{time}}",
|
|
16
|
+
short: "{{date}} {{time}}"
|
|
17
|
+
}, o = {
|
|
18
|
+
date: t({
|
|
19
|
+
formats: m,
|
|
20
|
+
defaultWidth: "full"
|
|
21
|
+
}),
|
|
22
|
+
time: t({
|
|
23
|
+
formats: d,
|
|
24
|
+
defaultWidth: "full"
|
|
25
|
+
}),
|
|
26
|
+
dateTime: t({
|
|
27
|
+
formats: a,
|
|
28
|
+
defaultWidth: "full"
|
|
29
|
+
})
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
o as formatLong
|
|
33
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { isSameWeek as f } from "../../../isSameWeek.js";
|
|
2
|
+
function i(t, r, o) {
|
|
3
|
+
const e = "eeee p";
|
|
4
|
+
return f(t, r, o) ? e : t.getTime() > r.getTime() ? "'下个'" + e : "'上个'" + e;
|
|
5
|
+
}
|
|
6
|
+
const m = {
|
|
7
|
+
lastWeek: i,
|
|
8
|
+
// days before yesterday, maybe in this week or last week
|
|
9
|
+
yesterday: "'昨天' p",
|
|
10
|
+
today: "'今天' p",
|
|
11
|
+
tomorrow: "'明天' p",
|
|
12
|
+
nextWeek: i,
|
|
13
|
+
// days after tomorrow, maybe in this week or next week
|
|
14
|
+
other: "PP p"
|
|
15
|
+
}, c = (t, r, o, e) => {
|
|
16
|
+
const n = m[t];
|
|
17
|
+
return typeof n == "function" ? n(r, o, e) : n;
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
c as formatRelative
|
|
21
|
+
};
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { buildLocalizeFn as e } from "../../_lib/buildLocalizeFn.js";
|
|
2
|
+
const i = {
|
|
3
|
+
narrow: ["前", "公元"],
|
|
4
|
+
abbreviated: ["前", "公元"],
|
|
5
|
+
wide: ["公元前", "公元"]
|
|
6
|
+
}, r = {
|
|
7
|
+
narrow: ["1", "2", "3", "4"],
|
|
8
|
+
abbreviated: ["第一季", "第二季", "第三季", "第四季"],
|
|
9
|
+
wide: ["第一季度", "第二季度", "第三季度", "第四季度"]
|
|
10
|
+
}, o = {
|
|
11
|
+
narrow: [
|
|
12
|
+
"一",
|
|
13
|
+
"二",
|
|
14
|
+
"三",
|
|
15
|
+
"四",
|
|
16
|
+
"五",
|
|
17
|
+
"六",
|
|
18
|
+
"七",
|
|
19
|
+
"八",
|
|
20
|
+
"九",
|
|
21
|
+
"十",
|
|
22
|
+
"十一",
|
|
23
|
+
"十二"
|
|
24
|
+
],
|
|
25
|
+
abbreviated: [
|
|
26
|
+
"1月",
|
|
27
|
+
"2月",
|
|
28
|
+
"3月",
|
|
29
|
+
"4月",
|
|
30
|
+
"5月",
|
|
31
|
+
"6月",
|
|
32
|
+
"7月",
|
|
33
|
+
"8月",
|
|
34
|
+
"9月",
|
|
35
|
+
"10月",
|
|
36
|
+
"11月",
|
|
37
|
+
"12月"
|
|
38
|
+
],
|
|
39
|
+
wide: [
|
|
40
|
+
"一月",
|
|
41
|
+
"二月",
|
|
42
|
+
"三月",
|
|
43
|
+
"四月",
|
|
44
|
+
"五月",
|
|
45
|
+
"六月",
|
|
46
|
+
"七月",
|
|
47
|
+
"八月",
|
|
48
|
+
"九月",
|
|
49
|
+
"十月",
|
|
50
|
+
"十一月",
|
|
51
|
+
"十二月"
|
|
52
|
+
]
|
|
53
|
+
}, d = {
|
|
54
|
+
narrow: ["日", "一", "二", "三", "四", "五", "六"],
|
|
55
|
+
short: ["日", "一", "二", "三", "四", "五", "六"],
|
|
56
|
+
abbreviated: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
|
57
|
+
wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
|
|
58
|
+
}, m = {
|
|
59
|
+
narrow: {
|
|
60
|
+
am: "上",
|
|
61
|
+
pm: "下",
|
|
62
|
+
midnight: "凌晨",
|
|
63
|
+
noon: "午",
|
|
64
|
+
morning: "早",
|
|
65
|
+
afternoon: "下午",
|
|
66
|
+
evening: "晚",
|
|
67
|
+
night: "夜"
|
|
68
|
+
},
|
|
69
|
+
abbreviated: {
|
|
70
|
+
am: "上午",
|
|
71
|
+
pm: "下午",
|
|
72
|
+
midnight: "凌晨",
|
|
73
|
+
noon: "中午",
|
|
74
|
+
morning: "早晨",
|
|
75
|
+
afternoon: "中午",
|
|
76
|
+
evening: "晚上",
|
|
77
|
+
night: "夜间"
|
|
78
|
+
},
|
|
79
|
+
wide: {
|
|
80
|
+
am: "上午",
|
|
81
|
+
pm: "下午",
|
|
82
|
+
midnight: "凌晨",
|
|
83
|
+
noon: "中午",
|
|
84
|
+
morning: "早晨",
|
|
85
|
+
afternoon: "中午",
|
|
86
|
+
evening: "晚上",
|
|
87
|
+
night: "夜间"
|
|
88
|
+
}
|
|
89
|
+
}, u = {
|
|
90
|
+
narrow: {
|
|
91
|
+
am: "上",
|
|
92
|
+
pm: "下",
|
|
93
|
+
midnight: "凌晨",
|
|
94
|
+
noon: "午",
|
|
95
|
+
morning: "早",
|
|
96
|
+
afternoon: "下午",
|
|
97
|
+
evening: "晚",
|
|
98
|
+
night: "夜"
|
|
99
|
+
},
|
|
100
|
+
abbreviated: {
|
|
101
|
+
am: "上午",
|
|
102
|
+
pm: "下午",
|
|
103
|
+
midnight: "凌晨",
|
|
104
|
+
noon: "中午",
|
|
105
|
+
morning: "早晨",
|
|
106
|
+
afternoon: "中午",
|
|
107
|
+
evening: "晚上",
|
|
108
|
+
night: "夜间"
|
|
109
|
+
},
|
|
110
|
+
wide: {
|
|
111
|
+
am: "上午",
|
|
112
|
+
pm: "下午",
|
|
113
|
+
midnight: "凌晨",
|
|
114
|
+
noon: "中午",
|
|
115
|
+
morning: "早晨",
|
|
116
|
+
afternoon: "中午",
|
|
117
|
+
evening: "晚上",
|
|
118
|
+
night: "夜间"
|
|
119
|
+
}
|
|
120
|
+
}, g = (t, a) => {
|
|
121
|
+
const n = Number(t);
|
|
122
|
+
switch (a == null ? void 0 : a.unit) {
|
|
123
|
+
case "date":
|
|
124
|
+
return n.toString() + "日";
|
|
125
|
+
case "hour":
|
|
126
|
+
return n.toString() + "时";
|
|
127
|
+
case "minute":
|
|
128
|
+
return n.toString() + "分";
|
|
129
|
+
case "second":
|
|
130
|
+
return n.toString() + "秒";
|
|
131
|
+
default:
|
|
132
|
+
return "第 " + n.toString();
|
|
133
|
+
}
|
|
134
|
+
}, s = {
|
|
135
|
+
ordinalNumber: g,
|
|
136
|
+
era: e({
|
|
137
|
+
values: i,
|
|
138
|
+
defaultWidth: "wide"
|
|
139
|
+
}),
|
|
140
|
+
quarter: e({
|
|
141
|
+
values: r,
|
|
142
|
+
defaultWidth: "wide",
|
|
143
|
+
argumentCallback: (t) => t - 1
|
|
144
|
+
}),
|
|
145
|
+
month: e({
|
|
146
|
+
values: o,
|
|
147
|
+
defaultWidth: "wide"
|
|
148
|
+
}),
|
|
149
|
+
day: e({
|
|
150
|
+
values: d,
|
|
151
|
+
defaultWidth: "wide"
|
|
152
|
+
}),
|
|
153
|
+
dayPeriod: e({
|
|
154
|
+
values: m,
|
|
155
|
+
defaultWidth: "wide",
|
|
156
|
+
formattingValues: u,
|
|
157
|
+
defaultFormattingWidth: "wide"
|
|
158
|
+
})
|
|
159
|
+
};
|
|
160
|
+
export {
|
|
161
|
+
s as localize
|
|
162
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { buildMatchFn as a } from "../../_lib/buildMatchFn.js";
|
|
2
|
+
import { buildMatchPatternFn as i } from "../../_lib/buildMatchPatternFn.js";
|
|
3
|
+
const e = /^(第\s*)?\d+(日|时|分|秒)?/i, r = /\d+/i, n = {
|
|
4
|
+
narrow: /^(前)/i,
|
|
5
|
+
abbreviated: /^(前)/i,
|
|
6
|
+
wide: /^(公元前|公元)/i
|
|
7
|
+
}, s = {
|
|
8
|
+
any: [/^(前)/i, /^(公元)/i]
|
|
9
|
+
}, d = {
|
|
10
|
+
narrow: /^[1234]/i,
|
|
11
|
+
abbreviated: /^第[一二三四]刻/i,
|
|
12
|
+
wide: /^第[一二三四]刻钟/i
|
|
13
|
+
}, h = {
|
|
14
|
+
any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i]
|
|
15
|
+
}, o = {
|
|
16
|
+
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
|
|
17
|
+
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
|
|
18
|
+
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
|
|
19
|
+
}, c = {
|
|
20
|
+
narrow: [
|
|
21
|
+
/^一/i,
|
|
22
|
+
/^二/i,
|
|
23
|
+
/^三/i,
|
|
24
|
+
/^四/i,
|
|
25
|
+
/^五/i,
|
|
26
|
+
/^六/i,
|
|
27
|
+
/^七/i,
|
|
28
|
+
/^八/i,
|
|
29
|
+
/^九/i,
|
|
30
|
+
/^十(?!(一|二))/i,
|
|
31
|
+
/^十一/i,
|
|
32
|
+
/^十二/i
|
|
33
|
+
],
|
|
34
|
+
any: [
|
|
35
|
+
/^一|1/i,
|
|
36
|
+
/^二|2/i,
|
|
37
|
+
/^三|3/i,
|
|
38
|
+
/^四|4/i,
|
|
39
|
+
/^五|5/i,
|
|
40
|
+
/^六|6/i,
|
|
41
|
+
/^七|7/i,
|
|
42
|
+
/^八|8/i,
|
|
43
|
+
/^九|9/i,
|
|
44
|
+
/^十(?!(一|二))|10/i,
|
|
45
|
+
/^十一|11/i,
|
|
46
|
+
/^十二|12/i
|
|
47
|
+
]
|
|
48
|
+
}, P = {
|
|
49
|
+
narrow: /^[一二三四五六日]/i,
|
|
50
|
+
short: /^[一二三四五六日]/i,
|
|
51
|
+
abbreviated: /^周[一二三四五六日]/i,
|
|
52
|
+
wide: /^星期[一二三四五六日]/i
|
|
53
|
+
}, m = {
|
|
54
|
+
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i]
|
|
55
|
+
}, l = {
|
|
56
|
+
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i
|
|
57
|
+
}, u = {
|
|
58
|
+
any: {
|
|
59
|
+
am: /^上午?/i,
|
|
60
|
+
pm: /^下午?/i,
|
|
61
|
+
midnight: /^午夜/i,
|
|
62
|
+
noon: /^[中正]午/i,
|
|
63
|
+
morning: /^早上/i,
|
|
64
|
+
afternoon: /^下午/i,
|
|
65
|
+
evening: /^晚上?/i,
|
|
66
|
+
night: /^凌晨/i
|
|
67
|
+
}
|
|
68
|
+
}, b = {
|
|
69
|
+
ordinalNumber: i({
|
|
70
|
+
matchPattern: e,
|
|
71
|
+
parsePattern: r,
|
|
72
|
+
valueCallback: (t) => parseInt(t, 10)
|
|
73
|
+
}),
|
|
74
|
+
era: a({
|
|
75
|
+
matchPatterns: n,
|
|
76
|
+
defaultMatchWidth: "wide",
|
|
77
|
+
parsePatterns: s,
|
|
78
|
+
defaultParseWidth: "any"
|
|
79
|
+
}),
|
|
80
|
+
quarter: a({
|
|
81
|
+
matchPatterns: d,
|
|
82
|
+
defaultMatchWidth: "wide",
|
|
83
|
+
parsePatterns: h,
|
|
84
|
+
defaultParseWidth: "any",
|
|
85
|
+
valueCallback: (t) => t + 1
|
|
86
|
+
}),
|
|
87
|
+
month: a({
|
|
88
|
+
matchPatterns: o,
|
|
89
|
+
defaultMatchWidth: "wide",
|
|
90
|
+
parsePatterns: c,
|
|
91
|
+
defaultParseWidth: "any"
|
|
92
|
+
}),
|
|
93
|
+
day: a({
|
|
94
|
+
matchPatterns: P,
|
|
95
|
+
defaultMatchWidth: "wide",
|
|
96
|
+
parsePatterns: m,
|
|
97
|
+
defaultParseWidth: "any"
|
|
98
|
+
}),
|
|
99
|
+
dayPeriod: a({
|
|
100
|
+
matchPatterns: l,
|
|
101
|
+
defaultMatchWidth: "any",
|
|
102
|
+
parsePatterns: u,
|
|
103
|
+
defaultParseWidth: "any"
|
|
104
|
+
})
|
|
105
|
+
};
|
|
106
|
+
export {
|
|
107
|
+
b as match
|
|
108
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { formatDistance as o } from "./zh-CN/_lib/formatDistance.js";
|
|
2
|
+
import { formatLong as t } from "./zh-CN/_lib/formatLong.js";
|
|
3
|
+
import { formatRelative as a } from "./zh-CN/_lib/formatRelative.js";
|
|
4
|
+
import { localize as r } from "./zh-CN/_lib/localize.js";
|
|
5
|
+
import { match as m } from "./zh-CN/_lib/match.js";
|
|
6
|
+
const s = {
|
|
7
|
+
code: "zh-CN",
|
|
8
|
+
formatDistance: o,
|
|
9
|
+
formatLong: t,
|
|
10
|
+
formatRelative: a,
|
|
11
|
+
localize: r,
|
|
12
|
+
match: m,
|
|
13
|
+
options: {
|
|
14
|
+
weekStartsOn: 1,
|
|
15
|
+
firstWeekContainsDate: 4
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
s as default,
|
|
20
|
+
s as zhCN
|
|
21
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { getDefaultOptions as m } from "./_lib/defaultOptions.js";
|
|
2
|
+
import { toDate as n } from "./toDate.js";
|
|
3
|
+
function x(D, e) {
|
|
4
|
+
var c, O, l, k, u, d, s, w;
|
|
5
|
+
const a = m(), r = (w = (s = (k = (l = e == null ? void 0 : e.weekStartsOn) != null ? l : (O = (c = e == null ? void 0 : e.locale) == null ? void 0 : c.options) == null ? void 0 : O.weekStartsOn) != null ? k : a.weekStartsOn) != null ? s : (d = (u = a.locale) == null ? void 0 : u.options) == null ? void 0 : d.weekStartsOn) != null ? w : 0, t = n(D, e == null ? void 0 : e.in), f = t.getDay(), S = (f < r ? 7 : 0) + f - r;
|
|
6
|
+
return t.setDate(t.getDate() - S), t.setHours(0, 0, 0, 0), t;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
x as default,
|
|
10
|
+
x as startOfWeek
|
|
11
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index6.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|
|
@@ -24,6 +24,10 @@ export interface HeroBannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
24
24
|
* What background image or color to use
|
|
25
25
|
*/
|
|
26
26
|
background?: string;
|
|
27
|
+
/**
|
|
28
|
+
* What gradient to use
|
|
29
|
+
*/
|
|
30
|
+
gradient?: string;
|
|
27
31
|
/**
|
|
28
32
|
* Unique id for component testing
|
|
29
33
|
*/
|
|
@@ -38,5 +42,5 @@ export interface HeroBannerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
38
42
|
*
|
|
39
43
|
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-herobanner--overview)
|
|
40
44
|
*/
|
|
41
|
-
declare const HeroBanner: ({ prehead, date, headerText, subHeadText, association, background, className, ...props }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
declare const HeroBanner: ({ prehead, date, headerText, subHeadText, association, background, gradient, className, ...props }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
46
|
export default HeroBanner;
|
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { getCommonProps as
|
|
3
|
-
import
|
|
4
|
-
import { TextVariants as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
prehead:
|
|
8
|
-
date:
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as f } from "../../utils/index.js";
|
|
3
|
+
import u from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { TextVariants as i } from "../../components/Text/types.js";
|
|
5
|
+
import c from "../../components/Text/Text.js";
|
|
6
|
+
const w = ({
|
|
7
|
+
prehead: a,
|
|
8
|
+
date: e,
|
|
9
9
|
headerText: t,
|
|
10
|
-
subHeadText:
|
|
10
|
+
subHeadText: l,
|
|
11
11
|
association: s,
|
|
12
|
-
background:
|
|
12
|
+
background: d,
|
|
13
|
+
gradient: p = "linear-gradient(rgba(0, 0, 0, 50%), rgba(0, 0, 0, 50%))",
|
|
13
14
|
className: h,
|
|
14
15
|
...o
|
|
15
16
|
}) => {
|
|
16
|
-
const { className:
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
const { className: n, ...g } = f(o, "HeroBanner");
|
|
18
|
+
return /* @__PURE__ */ r(
|
|
18
19
|
"header",
|
|
19
20
|
{
|
|
20
|
-
...
|
|
21
|
-
className:
|
|
22
|
-
style: { "--background": p },
|
|
21
|
+
...g,
|
|
22
|
+
className: u(n, h),
|
|
23
|
+
style: { "--background": d, "--gradient": p },
|
|
23
24
|
...o,
|
|
24
|
-
children: /* @__PURE__ */ m("span", { className: `${
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
children: /* @__PURE__ */ m("span", { className: `${n}__content-wrapper`, children: [
|
|
26
|
+
a || e ? /* @__PURE__ */ m("p", { className: `${n}__pre-head`, children: [
|
|
27
|
+
a ? /* @__PURE__ */ r("span", { children: a }) : null,
|
|
28
|
+
e ? /* @__PURE__ */ r("span", { children: e }) : null
|
|
28
29
|
] }) : null,
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
s ? /* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ r(c, { variant: i.snwHeadingHero1, children: t }),
|
|
31
|
+
l ? /* @__PURE__ */ r(c, { variant: i.snwHeadingHero2, children: l }) : null,
|
|
32
|
+
s ? /* @__PURE__ */ r("p", { className: `${n}__after-head`, children: s }) : null
|
|
32
33
|
] })
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
36
|
};
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
w as default
|
|
38
39
|
};
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { HeroBannerProps } from './HeroBanner';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ prehead, date, headerText, subHeadText, association, background, className, ...props }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ prehead, date, headerText, subHeadText, association, background, gradient, className, ...props }: HeroBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
};
|
|
7
7
|
export default meta;
|
|
8
8
|
type Story = StoryObj<typeof meta>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { default as SaleHeaderBanner, type SaleHeaderBannerProps } from './SaleHeaderBanner';
|
|
2
2
|
export { default as SaleHeaderBrowseAuctions, type SaleHeaderBrowseAuctionsProps } from './SaleHeaderBrowseAuctions';
|
|
3
|
-
export { default as SaleHeaderCountdown, type SaleHeaderCountdownProps } from './SaleHeaderCountdown';
|
|
4
3
|
export { AuctionState } from './types';
|
package/dist/scss/_type.scss
CHANGED
|
@@ -223,4 +223,16 @@
|
|
|
223
223
|
line-height: $snw-flyout-link-line-height;
|
|
224
224
|
text-transform: capitalize;
|
|
225
225
|
}
|
|
226
|
+
|
|
227
|
+
@if $token == 'snwHeadingHero1' {
|
|
228
|
+
@include hText($snw-heading-hero-size1, $line-height: $snw-heading-hero-line-height1, $transform-style: uppercase);
|
|
229
|
+
|
|
230
|
+
text-align: center;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@if $token == 'snwHeadingHero2' {
|
|
234
|
+
@include hText($snw-heading-hero-size2, $line-height: $snw-heading-hero-line-height2, $transform-style: uppercase);
|
|
235
|
+
|
|
236
|
+
text-align: center;
|
|
237
|
+
}
|
|
226
238
|
}
|
package/dist/scss/_vars.scss
CHANGED
|
@@ -98,9 +98,11 @@ $string2: 'string2';
|
|
|
98
98
|
$string3: 'string3';
|
|
99
99
|
$snwHeaderLink: 'snwHeaderLink';
|
|
100
100
|
$snwFlyoutLink: 'snwFlyoutLink';
|
|
101
|
+
$snwHeadingHero1: 'snwHeadingHero1';
|
|
102
|
+
$snwHeadingHero2: 'snwHeadingHero2';
|
|
101
103
|
$text-tokens: $button, $link, $email, $label, $badge, $blockquote, $heading1, $heading2, $heading3, $heading4, $heading5,
|
|
102
104
|
$title1, $title2, $title3, $title4, $body1, $body2, $body3, $string1, $string2, $string3, $snwFlyoutLink,
|
|
103
|
-
$snwHeaderLink;
|
|
105
|
+
$snwHeaderLink, $snwHeadingHero1, $snwHeadingHero2;
|
|
104
106
|
|
|
105
107
|
////////////////////////
|
|
106
108
|
/// Breakpoint TOKENS to be used for min-width comparisons, make sure they match BREAKPOINTS in constants.ts
|
|
@@ -153,6 +155,10 @@ $breakpoint-xl: 1801px;
|
|
|
153
155
|
--snw-header-link-line-height: 1.5rem;
|
|
154
156
|
--snw-flyout-link-size: 1rem;
|
|
155
157
|
--snw-flyout-link-line-height: 1.75rem;
|
|
158
|
+
--snw-heading-hero-size1: 2rem;
|
|
159
|
+
--snw-heading-hero-line-height-size1: 2.375rem;
|
|
160
|
+
--snw-heading-hero-size2: 1.625rem;
|
|
161
|
+
--snw-heading-hero-line-height-size2: 1.9375rem;
|
|
156
162
|
|
|
157
163
|
@media (min-width: $breakpoint-md) {
|
|
158
164
|
--quote-size: 1.75rem;
|
|
@@ -192,6 +198,8 @@ $breakpoint-xl: 1801px;
|
|
|
192
198
|
--snw-header-link-line-height: 1.5rem;
|
|
193
199
|
--snw-flyout-link-size: 1rem;
|
|
194
200
|
--snw-flyout-link-line-height: 1.875rem;
|
|
201
|
+
--snw-heading-hero-size1: 2.375rem;
|
|
202
|
+
--snw-heading-hero-line-height-size1: 2.875rem;
|
|
195
203
|
}
|
|
196
204
|
|
|
197
205
|
@media (min-width: $breakpoint-xl) {
|
|
@@ -283,10 +291,18 @@ $snw-header-link-size: var(--snw-header-link-size);
|
|
|
283
291
|
$snw-header-link-line-height: var(--snw-header-link-line-height);
|
|
284
292
|
$snw-flyout-link-size: var(--snw-flyout-link-size);
|
|
285
293
|
$snw-flyout-link-line-height: var(--snw-flyout-link-line-height);
|
|
294
|
+
$snw-heading-hero-size1: var(--snw-heading-hero-size1);
|
|
295
|
+
$snw-heading-hero-line-height1: var(--snw-heading-hero-line-height-size1);
|
|
296
|
+
$snw-heading-hero-size2: var(--snw-heading-hero-size2);
|
|
297
|
+
$snw-heading-hero-line-height2: var(--snw-heading-hero-line-height-size2);
|
|
286
298
|
|
|
287
299
|
////////////////////////
|
|
288
300
|
/// SPACING TOKENS:
|
|
289
301
|
///////////////////////
|
|
302
|
+
|
|
303
|
+
// SNOWFLAKES
|
|
304
|
+
$snowflake-menu-padding: 1.25rem;
|
|
305
|
+
|
|
290
306
|
/* stylelint-disable-next-line no-duplicate-selectors */
|
|
291
307
|
:root {
|
|
292
308
|
--spacing-micro: 0.25rem;
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
@use 'components/ContentPeek/contentPeek';
|
|
37
37
|
@use 'components/PageContentWrapper/pageContentWrapper';
|
|
38
38
|
@use 'components/Carousel/carousel';
|
|
39
|
+
@use 'components/Countdown/countdown';
|
|
40
|
+
@use 'components/Countdown/duration';
|
|
39
41
|
|
|
40
42
|
// Patterns
|
|
41
43
|
@use 'patterns/HeroBanner/heroBanner';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
|
|
11
11
|
&--large {
|
|
12
|
-
padding: $
|
|
12
|
+
padding: $snowflake-menu-padding 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
svg {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
padding: $spacing-sm 0;
|
|
104
104
|
|
|
105
105
|
&--large {
|
|
106
|
-
padding: $
|
|
106
|
+
padding: $snowflake-menu-padding 0;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
&--hoverable {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@use '../../allPartials' as *;
|
|
2
|
+
|
|
3
|
+
.#{$px}-countdown {
|
|
4
|
+
@include text($body2);
|
|
5
|
+
|
|
6
|
+
align-items: center;
|
|
7
|
+
border-bottom: 1px solid $light-gray;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: $spacing-micro;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
margin-bottom: 1.5rem;
|
|
13
|
+
padding: 0 $spacing-sm $spacing-sm;
|
|
14
|
+
width: 100%;
|
|
15
|
+
|
|
16
|
+
&__countdown-container {
|
|
17
|
+
@include text($heading5);
|
|
18
|
+
|
|
19
|
+
align-items: center;
|
|
20
|
+
display: flex;
|
|
21
|
+
gap: $spacing-sm;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
text-transform: inherit;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -70,7 +70,7 @@ $top-transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
70
70
|
.#{$px}-link--snwHeaderLink {
|
|
71
71
|
border-bottom: 1px solid $light-gray;
|
|
72
72
|
flex-wrap: wrap;
|
|
73
|
-
padding: $
|
|
73
|
+
padding: $snowflake-menu-padding 0;
|
|
74
74
|
}
|
|
75
75
|
.#{$px}-link--snwFlyoutLink {
|
|
76
76
|
padding: 0;
|