hds-web 1.16.7 → 1.16.8
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/index.css +2 -2
- package/dist/index.es.css +2 -2
- package/dist/index.es.js +5 -5
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/src/HDS/assets/icons/queries.svg +1 -1
- package/src/HDS/assets/icons/x-close.svg +1 -1
- package/src/HDS/components/Cards/Dropdown/v3Dropdown.js +2 -2
- package/src/HDS/components/Cards/TalkDetailCard/talkDetailCard.js +66 -5
- package/src/HDS/components/Headers/v3Header.js +974 -412
- package/src/HDS/helpers/Paperform/index.js +1 -0
- package/src/HDS/helpers/Paperform/paperform.js +107 -0
- package/src/HDS/helpers/Paperform/utils/index.js +1 -0
- package/src/HDS/helpers/Paperform/utils/readcookie.js +28 -0
- package/src/HDS/helpers/index.js +2 -1
- package/src/HDS/modules/TextCard/textCard.js +1 -1
- package/src/styles/tailwind.css +100 -51
@@ -0,0 +1 @@
|
|
1
|
+
export {default as HDSPaperForm} from './paperform';
|
@@ -0,0 +1,107 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { useState, useEffect, useRef } from "react";
|
3
|
+
// import { useRouter } from 'next/router'
|
4
|
+
import { GetUtmCookie } from "./utils";
|
5
|
+
import { Typography } from "../../foundation/Typography";
|
6
|
+
|
7
|
+
export default function Paperform(
|
8
|
+
{
|
9
|
+
formId,
|
10
|
+
onSubmitCB,
|
11
|
+
styleClass,
|
12
|
+
hasuraConRegSuccessUrl
|
13
|
+
},
|
14
|
+
props
|
15
|
+
)
|
16
|
+
{
|
17
|
+
const isBrowser = typeof window !== "undefined";
|
18
|
+
const [isLoaded, setIsLoaded] = useState(false);
|
19
|
+
const embedDivRef = useRef(null);
|
20
|
+
// const router = useRouter();
|
21
|
+
useEffect(() => {
|
22
|
+
const existingEmbed = document.getElementById("paperform_embed");
|
23
|
+
|
24
|
+
if (existingEmbed) {
|
25
|
+
setIsLoaded(true);
|
26
|
+
return;
|
27
|
+
}
|
28
|
+
const script = document.createElement("script");
|
29
|
+
script.id = "paperform_embed";
|
30
|
+
script.src = "https://forms.hasura.io/__embed.min.js";
|
31
|
+
script.onreadystatechange = () => {
|
32
|
+
if (this.readyState === "complete" || this.readyState === "loaded") {
|
33
|
+
setIsLoaded(true);
|
34
|
+
}
|
35
|
+
};
|
36
|
+
script.onload = () => setIsLoaded(true);
|
37
|
+
document.body.prepend(script);
|
38
|
+
|
39
|
+
return () => script.remove();
|
40
|
+
}, []);
|
41
|
+
|
42
|
+
function handleFormSubmit({ detail }) {
|
43
|
+
const { form_id, data } = detail;
|
44
|
+
|
45
|
+
const email = data.find((d) => d.type === "email")?.value;
|
46
|
+
|
47
|
+
if (!!email) {
|
48
|
+
if (isBrowser) {
|
49
|
+
window?.analytics?.identify(email, {
|
50
|
+
email,
|
51
|
+
identifiedBy: `Paperform ${form_id} Submitted`,
|
52
|
+
// ...nameTraits,
|
53
|
+
});
|
54
|
+
}
|
55
|
+
}
|
56
|
+
if (isBrowser) {
|
57
|
+
window?.analytics?.track("form submit", {
|
58
|
+
data,
|
59
|
+
category: "website",
|
60
|
+
label: `Paperform ${form_id} Submitted`,
|
61
|
+
action: "form submit",
|
62
|
+
});
|
63
|
+
}
|
64
|
+
|
65
|
+
typeof onSubmitCB === "function" && onSubmitCB(detail);
|
66
|
+
window.location.reload(`${window.location.pathname}?aliId=success_submit`);
|
67
|
+
}
|
68
|
+
|
69
|
+
useEffect(() => {
|
70
|
+
const refCurrValue = embedDivRef.current;
|
71
|
+
const utm_cookies = GetUtmCookie();
|
72
|
+
isBrowser &&
|
73
|
+
refCurrValue?.setAttribute(
|
74
|
+
"data-prefill",
|
75
|
+
`utm_landing-page=${window.location.pathname}&utm_search=${window.location.search}&utm_campaign=${utm_cookies.utm_campaign}&utm_medium=${utm_cookies.utm_medium}&utm_source=${utm_cookies.utm_source}&utm_content=${utm_cookies.utm_content}`
|
76
|
+
);
|
77
|
+
|
78
|
+
refCurrValue?.addEventListener("PaperformSubmission", handleFormSubmit);
|
79
|
+
|
80
|
+
return () =>
|
81
|
+
refCurrValue?.removeEventListener(
|
82
|
+
"PaperformSubmission",
|
83
|
+
handleFormSubmit
|
84
|
+
);
|
85
|
+
}, []);
|
86
|
+
return (
|
87
|
+
<div className={styleClass}>
|
88
|
+
{!isLoaded && (
|
89
|
+
<Typography
|
90
|
+
textStyle="h5"
|
91
|
+
as="h5"
|
92
|
+
className="text-neutral-800 font-medium py-8 tb:py-12"
|
93
|
+
>
|
94
|
+
Loading...
|
95
|
+
</Typography>
|
96
|
+
)}
|
97
|
+
<div
|
98
|
+
data-prefill-inherit="1"
|
99
|
+
data-no-scroll="1"
|
100
|
+
ref={embedDivRef}
|
101
|
+
id={formId}
|
102
|
+
data-paperform-id={formId}
|
103
|
+
data-spinner="1"
|
104
|
+
/>
|
105
|
+
</div>
|
106
|
+
);
|
107
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as GetUtmCookie } from './readcookie'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import React from "react";
|
2
|
+
|
3
|
+
const readCookie = name => {
|
4
|
+
var nameEQ = name + "=";
|
5
|
+
var ca = document.cookie.split(";");
|
6
|
+
for (var i = 0; i < ca.length; i++) {
|
7
|
+
var c = ca[i];
|
8
|
+
while (c.charAt(0) === " ") c = c.substring(1, c.length);
|
9
|
+
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
10
|
+
}
|
11
|
+
return "";
|
12
|
+
};
|
13
|
+
|
14
|
+
const GetUtmCookie = () => {
|
15
|
+
const utm_campaign = readCookie("utm_campaign");
|
16
|
+
const utm_medium = readCookie("utm_medium");
|
17
|
+
const utm_source = readCookie("utm_source");
|
18
|
+
const utm_content = readCookie("utm_content");
|
19
|
+
return {
|
20
|
+
utm_campaign,
|
21
|
+
utm_medium,
|
22
|
+
utm_source,
|
23
|
+
utm_content,
|
24
|
+
};
|
25
|
+
};
|
26
|
+
|
27
|
+
|
28
|
+
export default GetUtmCookie;
|
package/src/HDS/helpers/index.js
CHANGED
package/src/styles/tailwind.css
CHANGED
@@ -889,6 +889,14 @@ select{
|
|
889
889
|
left: -137px;
|
890
890
|
}
|
891
891
|
|
892
|
+
.-left-\[218px\]{
|
893
|
+
left: -218px;
|
894
|
+
}
|
895
|
+
|
896
|
+
.-left-\[50px\]{
|
897
|
+
left: -50px;
|
898
|
+
}
|
899
|
+
|
892
900
|
.-left-\[60\%\]{
|
893
901
|
left: -60%;
|
894
902
|
}
|
@@ -941,10 +949,18 @@ select{
|
|
941
949
|
left: 1rem;
|
942
950
|
}
|
943
951
|
|
952
|
+
.left-6{
|
953
|
+
left: 1.5rem;
|
954
|
+
}
|
955
|
+
|
944
956
|
.left-\[0px\]{
|
945
957
|
left: 0px;
|
946
958
|
}
|
947
959
|
|
960
|
+
.left-\[108px\]{
|
961
|
+
left: 108px;
|
962
|
+
}
|
963
|
+
|
948
964
|
.left-\[160\%\]{
|
949
965
|
left: 160%;
|
950
966
|
}
|
@@ -953,6 +969,10 @@ select{
|
|
953
969
|
left: 17.6%;
|
954
970
|
}
|
955
971
|
|
972
|
+
.left-\[200px\]{
|
973
|
+
left: 200px;
|
974
|
+
}
|
975
|
+
|
956
976
|
.left-\[45\%\]{
|
957
977
|
left: 45%;
|
958
978
|
}
|
@@ -1009,6 +1029,10 @@ select{
|
|
1009
1029
|
top: 1.25rem;
|
1010
1030
|
}
|
1011
1031
|
|
1032
|
+
.top-8{
|
1033
|
+
top: 2rem;
|
1034
|
+
}
|
1035
|
+
|
1012
1036
|
.top-\[112px\]{
|
1013
1037
|
top: 112px;
|
1014
1038
|
}
|
@@ -1029,14 +1053,6 @@ select{
|
|
1029
1053
|
top: 96px;
|
1030
1054
|
}
|
1031
1055
|
|
1032
|
-
.-left-\[218px\]{
|
1033
|
-
left: -218px;
|
1034
|
-
}
|
1035
|
-
|
1036
|
-
.-left-\[50px\]{
|
1037
|
-
left: -50px;
|
1038
|
-
}
|
1039
|
-
|
1040
1056
|
.isolate{
|
1041
1057
|
isolation: isolate;
|
1042
1058
|
}
|
@@ -1236,6 +1252,10 @@ select{
|
|
1236
1252
|
margin-bottom: 1.5rem;
|
1237
1253
|
}
|
1238
1254
|
|
1255
|
+
.-mb-2{
|
1256
|
+
margin-bottom: -0.5rem;
|
1257
|
+
}
|
1258
|
+
|
1239
1259
|
.-mb-\[112\%\]{
|
1240
1260
|
margin-bottom: -112%;
|
1241
1261
|
}
|
@@ -1268,6 +1288,10 @@ select{
|
|
1268
1288
|
margin-left: -1rem;
|
1269
1289
|
}
|
1270
1290
|
|
1291
|
+
.-ml-9{
|
1292
|
+
margin-left: -2.25rem;
|
1293
|
+
}
|
1294
|
+
|
1271
1295
|
.-ml-px{
|
1272
1296
|
margin-left: -1px;
|
1273
1297
|
}
|
@@ -1380,6 +1404,10 @@ select{
|
|
1380
1404
|
margin-right: 0.5rem;
|
1381
1405
|
}
|
1382
1406
|
|
1407
|
+
.mr-3{
|
1408
|
+
margin-right: 0.75rem;
|
1409
|
+
}
|
1410
|
+
|
1383
1411
|
.mr-4{
|
1384
1412
|
margin-right: 1rem;
|
1385
1413
|
}
|
@@ -1392,8 +1420,8 @@ select{
|
|
1392
1420
|
margin-right: 2rem;
|
1393
1421
|
}
|
1394
1422
|
|
1395
|
-
.mr-\[
|
1396
|
-
margin-right:
|
1423
|
+
.mr-\[17px\]{
|
1424
|
+
margin-right: 17px;
|
1397
1425
|
}
|
1398
1426
|
|
1399
1427
|
.mr-\[30px\]{
|
@@ -1464,10 +1492,6 @@ select{
|
|
1464
1492
|
margin-top: 70px;
|
1465
1493
|
}
|
1466
1494
|
|
1467
|
-
.mr-\[34px\]{
|
1468
|
-
margin-right: 34px;
|
1469
|
-
}
|
1470
|
-
|
1471
1495
|
.line-clamp-3{
|
1472
1496
|
overflow: hidden;
|
1473
1497
|
display: -webkit-box;
|
@@ -1647,6 +1671,10 @@ select{
|
|
1647
1671
|
height: 90px;
|
1648
1672
|
}
|
1649
1673
|
|
1674
|
+
.h-\[calc\(100\%-112px\)\]{
|
1675
|
+
height: calc(100% - 112px);
|
1676
|
+
}
|
1677
|
+
|
1650
1678
|
.h-\[calc\(100\%-1px\)\]{
|
1651
1679
|
height: calc(100% - 1px);
|
1652
1680
|
}
|
@@ -1675,6 +1703,10 @@ select{
|
|
1675
1703
|
max-height: 26.25;
|
1676
1704
|
}
|
1677
1705
|
|
1706
|
+
.max-h-\[530px\]{
|
1707
|
+
max-height: 530px;
|
1708
|
+
}
|
1709
|
+
|
1678
1710
|
.max-h-full{
|
1679
1711
|
max-height: 100%;
|
1680
1712
|
}
|
@@ -1711,10 +1743,6 @@ select{
|
|
1711
1743
|
min-height: 64px;
|
1712
1744
|
}
|
1713
1745
|
|
1714
|
-
.\!w-full{
|
1715
|
-
width: 100% !important;
|
1716
|
-
}
|
1717
|
-
|
1718
1746
|
.w-1\/2{
|
1719
1747
|
width: 50%;
|
1720
1748
|
}
|
@@ -2007,6 +2035,10 @@ select{
|
|
2007
2035
|
max-width: 400px;
|
2008
2036
|
}
|
2009
2037
|
|
2038
|
+
.max-w-\[412px\]{
|
2039
|
+
max-width: 412px;
|
2040
|
+
}
|
2041
|
+
|
2010
2042
|
.max-w-\[430px\]{
|
2011
2043
|
max-width: 430px;
|
2012
2044
|
}
|
@@ -2015,6 +2047,10 @@ select{
|
|
2015
2047
|
max-width: 44.44rem;
|
2016
2048
|
}
|
2017
2049
|
|
2050
|
+
.max-w-\[460px\]{
|
2051
|
+
max-width: 460px;
|
2052
|
+
}
|
2053
|
+
|
2018
2054
|
.max-w-\[583px\]{
|
2019
2055
|
max-width: 583px;
|
2020
2056
|
}
|
@@ -2085,6 +2121,11 @@ select{
|
|
2085
2121
|
table-layout: fixed;
|
2086
2122
|
}
|
2087
2123
|
|
2124
|
+
.origin-top-right{
|
2125
|
+
-webkit-transform-origin: top right;
|
2126
|
+
transform-origin: top right;
|
2127
|
+
}
|
2128
|
+
|
2088
2129
|
.-translate-x-1\/2{
|
2089
2130
|
--tw-translate-x: -50%;
|
2090
2131
|
-webkit-transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
@@ -2555,10 +2596,6 @@ select{
|
|
2555
2596
|
overflow-x: scroll;
|
2556
2597
|
}
|
2557
2598
|
|
2558
|
-
.overflow-y-scroll{
|
2559
|
-
overflow-y: scroll;
|
2560
|
-
}
|
2561
|
-
|
2562
2599
|
.whitespace-nowrap{
|
2563
2600
|
white-space: nowrap;
|
2564
2601
|
}
|
@@ -5206,6 +5243,10 @@ select{
|
|
5206
5243
|
--tw-gradient-to: #854D18 var(--tw-gradient-to-position);
|
5207
5244
|
}
|
5208
5245
|
|
5246
|
+
.fill-neutral-150{
|
5247
|
+
fill: #ECEDF0;
|
5248
|
+
}
|
5249
|
+
|
5209
5250
|
.stroke-amber-100{
|
5210
5251
|
stroke: #FFF3D4;
|
5211
5252
|
}
|
@@ -5953,6 +5994,10 @@ select{
|
|
5953
5994
|
padding-right: 10px;
|
5954
5995
|
}
|
5955
5996
|
|
5997
|
+
.pr-\[34px\]{
|
5998
|
+
padding-right: 34px;
|
5999
|
+
}
|
6000
|
+
|
5956
6001
|
.pt-0{
|
5957
6002
|
padding-top: 0px;
|
5958
6003
|
}
|
@@ -5997,6 +6042,10 @@ select{
|
|
5997
6042
|
padding-top: 2rem;
|
5998
6043
|
}
|
5999
6044
|
|
6045
|
+
.pt-9{
|
6046
|
+
padding-top: 2.25rem;
|
6047
|
+
}
|
6048
|
+
|
6000
6049
|
.pt-\[72px\]{
|
6001
6050
|
padding-top: 72px;
|
6002
6051
|
}
|
@@ -6856,6 +6905,12 @@ select{
|
|
6856
6905
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
6857
6906
|
}
|
6858
6907
|
|
6908
|
+
.shadow-home-drop{
|
6909
|
+
--tw-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.16);
|
6910
|
+
--tw-shadow-colored: 0px 10px 30px 0px var(--tw-shadow-color);
|
6911
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
6912
|
+
}
|
6913
|
+
|
6859
6914
|
.shadow-inner{
|
6860
6915
|
--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
|
6861
6916
|
--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);
|
@@ -9690,10 +9745,6 @@ select{
|
|
9690
9745
|
margin-left: 0px;
|
9691
9746
|
}
|
9692
9747
|
|
9693
|
-
.tb\:mr-4{
|
9694
|
-
margin-right: 1rem;
|
9695
|
-
}
|
9696
|
-
|
9697
9748
|
.tb\:mt-0{
|
9698
9749
|
margin-top: 0px;
|
9699
9750
|
}
|
@@ -9718,10 +9769,6 @@ select{
|
|
9718
9769
|
margin-top: -4px;
|
9719
9770
|
}
|
9720
9771
|
|
9721
|
-
.tb\:mr-\[16px\]{
|
9722
|
-
margin-right: 16px;
|
9723
|
-
}
|
9724
|
-
|
9725
9772
|
.tb\:block{
|
9726
9773
|
display: block;
|
9727
9774
|
}
|
@@ -9975,6 +10022,11 @@ select{
|
|
9975
10022
|
background-color: rgb(14 165 120 / var(--tw-bg-opacity));
|
9976
10023
|
}
|
9977
10024
|
|
10025
|
+
.tb\:bg-neutral-150{
|
10026
|
+
--tw-bg-opacity: 1;
|
10027
|
+
background-color: rgb(236 237 240 / var(--tw-bg-opacity));
|
10028
|
+
}
|
10029
|
+
|
9978
10030
|
.tb\:bg-pink-500{
|
9979
10031
|
--tw-bg-opacity: 1;
|
9980
10032
|
background-color: rgb(225 58 124 / var(--tw-bg-opacity));
|
@@ -10030,6 +10082,11 @@ select{
|
|
10030
10082
|
padding-right: 2rem;
|
10031
10083
|
}
|
10032
10084
|
|
10085
|
+
.tb\:py-12{
|
10086
|
+
padding-top: 3rem;
|
10087
|
+
padding-bottom: 3rem;
|
10088
|
+
}
|
10089
|
+
|
10033
10090
|
.tb\:py-14{
|
10034
10091
|
padding-top: 3.5rem;
|
10035
10092
|
padding-bottom: 3.5rem;
|
@@ -10051,10 +10108,6 @@ select{
|
|
10051
10108
|
padding-right: 0px;
|
10052
10109
|
}
|
10053
10110
|
|
10054
|
-
.tb\:pr-4{
|
10055
|
-
padding-right: 1rem;
|
10056
|
-
}
|
10057
|
-
|
10058
10111
|
.tb\:pt-0{
|
10059
10112
|
padding-top: 0px;
|
10060
10113
|
}
|
@@ -10525,6 +10578,10 @@ select{
|
|
10525
10578
|
}
|
10526
10579
|
|
10527
10580
|
@media (min-width: 905px){
|
10581
|
+
.tb-l\:m-2{
|
10582
|
+
margin: 0.5rem;
|
10583
|
+
}
|
10584
|
+
|
10528
10585
|
.tb-l\:mx-4{
|
10529
10586
|
margin-left: 1rem;
|
10530
10587
|
margin-right: 1rem;
|
@@ -10542,14 +10599,6 @@ select{
|
|
10542
10599
|
margin-top: 0px;
|
10543
10600
|
}
|
10544
10601
|
|
10545
|
-
.tb-l\:mr-\[34px\]{
|
10546
|
-
margin-right: 34px;
|
10547
|
-
}
|
10548
|
-
|
10549
|
-
.tb-l\:mr-\[16px\]{
|
10550
|
-
margin-right: 16px;
|
10551
|
-
}
|
10552
|
-
|
10553
10602
|
.tb-l\:block{
|
10554
10603
|
display: block;
|
10555
10604
|
}
|
@@ -10648,10 +10697,6 @@ select{
|
|
10648
10697
|
gap: 0px;
|
10649
10698
|
}
|
10650
10699
|
|
10651
|
-
.tb-l\:gap-2{
|
10652
|
-
gap: 0.5rem;
|
10653
|
-
}
|
10654
|
-
|
10655
10700
|
.tb-l\:gap-20{
|
10656
10701
|
gap: 5rem;
|
10657
10702
|
}
|
@@ -10704,11 +10749,6 @@ select{
|
|
10704
10749
|
border-right-color: rgb(229 231 235 / var(--tw-border-opacity));
|
10705
10750
|
}
|
10706
10751
|
|
10707
|
-
.tb-l\:bg-neutral-150{
|
10708
|
-
--tw-bg-opacity: 1;
|
10709
|
-
background-color: rgb(236 237 240 / var(--tw-bg-opacity));
|
10710
|
-
}
|
10711
|
-
|
10712
10752
|
.tb-l\:bg-gradient-to-r{
|
10713
10753
|
background-image: linear-gradient(to right, var(--tw-gradient-stops));
|
10714
10754
|
}
|
@@ -10717,6 +10757,10 @@ select{
|
|
10717
10757
|
padding: 2.5rem;
|
10718
10758
|
}
|
10719
10759
|
|
10760
|
+
.tb-l\:p-12{
|
10761
|
+
padding: 3rem;
|
10762
|
+
}
|
10763
|
+
|
10720
10764
|
.tb-l\:px-8{
|
10721
10765
|
padding-left: 2rem;
|
10722
10766
|
padding-right: 2rem;
|
@@ -11404,6 +11448,11 @@ select{
|
|
11404
11448
|
padding-bottom: 0.5rem;
|
11405
11449
|
}
|
11406
11450
|
|
11451
|
+
.\[\&\>p\]\:text-neutral-600>p{
|
11452
|
+
--tw-text-opacity: 1;
|
11453
|
+
color: rgb(77 87 97 / var(--tw-text-opacity));
|
11454
|
+
}
|
11455
|
+
|
11407
11456
|
.last\:\[\&\>p\]\:pb-0>p:last-child{
|
11408
11457
|
padding-bottom: 0px;
|
11409
11458
|
}
|