bhl-forms 0.0.15 → 0.0.18
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/bhl-forms.es.js +51 -35
- package/dist/bhl-forms.iife.js +10 -10
- package/dist/bhl-forms.umd.js +10 -10
- package/dist/forms/childAndFamily.es.js +75 -60
- package/dist/forms/childAndFamily.iife.js +1 -654
- package/dist/forms/childAndFamily.json +1 -1
- package/dist/forms/testForm.es.js +89 -54
- package/dist/forms/testForm.iife.js +1 -363
- package/dist/forms/testForm.json +1 -1
- package/dist/main.css +1 -1
- package/package.json +3 -2
package/dist/bhl-forms.es.js
CHANGED
|
@@ -10638,6 +10638,15 @@ function dbg() {
|
|
|
10638
10638
|
return;
|
|
10639
10639
|
console.debug(...arguments);
|
|
10640
10640
|
}
|
|
10641
|
+
function rollbar(type, msg) {
|
|
10642
|
+
if (window.Rollbar) {
|
|
10643
|
+
try {
|
|
10644
|
+
window.Rollbar[type](msg);
|
|
10645
|
+
} catch (err) {
|
|
10646
|
+
console.warn("error calling rollbar:", err);
|
|
10647
|
+
}
|
|
10648
|
+
}
|
|
10649
|
+
}
|
|
10641
10650
|
function chooseVariant(exp) {
|
|
10642
10651
|
let variant = null, active = {}, fromCache = false;
|
|
10643
10652
|
active = C(EXPERIMENT_KEY) || {};
|
|
@@ -10693,6 +10702,11 @@ const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
|
10693
10702
|
if (!stepResult) {
|
|
10694
10703
|
return;
|
|
10695
10704
|
}
|
|
10705
|
+
if (formNode.id) {
|
|
10706
|
+
const form2 = document.getElementById(formNode.id);
|
|
10707
|
+
if (form2)
|
|
10708
|
+
form2.scrollIntoView(true);
|
|
10709
|
+
}
|
|
10696
10710
|
const form_id = formNode.attrs.formId || window.location.hostname + "-" + formNode.id;
|
|
10697
10711
|
if (typeof window._analytics !== "undefined") {
|
|
10698
10712
|
try {
|
|
@@ -10707,69 +10721,71 @@ const fireStepEvent = (formNode) => (stepResult, stepHistory2, stepQueue2) => {
|
|
|
10707
10721
|
}
|
|
10708
10722
|
});
|
|
10709
10723
|
} catch (err) {
|
|
10710
|
-
|
|
10724
|
+
const msg = "failed to fire step event: " + err.toString();
|
|
10725
|
+
console.warn(msg);
|
|
10726
|
+
rollbar("warning", msg);
|
|
10711
10727
|
}
|
|
10712
10728
|
}
|
|
10713
10729
|
};
|
|
10714
10730
|
const textClassification = {
|
|
10715
|
-
label: "block mb-1 font-bold text-sm formkit-invalid:text-red-500",
|
|
10731
|
+
label: "t-block t-mb-1 t-font-bold t-text-sm formkit-invalid:t-text-red-500",
|
|
10716
10732
|
inner: `
|
|
10717
|
-
max-w-lg
|
|
10718
|
-
border
|
|
10719
|
-
border-gray-400
|
|
10720
|
-
formkit-invalid:border-red-500
|
|
10721
|
-
rounded-lg mb-1
|
|
10722
|
-
overflow-hidden
|
|
10723
|
-
focus-within:border-blue-500
|
|
10733
|
+
t-max-w-lg
|
|
10734
|
+
t-border
|
|
10735
|
+
t-border-gray-400
|
|
10736
|
+
formkit-invalid:t-border-red-500
|
|
10737
|
+
t-rounded-lg t-mb-1
|
|
10738
|
+
t-overflow-hidden
|
|
10739
|
+
focus-within:t-border-blue-500
|
|
10724
10740
|
`,
|
|
10725
|
-
input: "w-full h-10 px-3 border-none text-base text-gray-700 placeholder-gray-400"
|
|
10741
|
+
input: "t-w-full t-h-10 t-px-3 t-border-none t-text-base t-text-gray-700 t-placeholder-gray-400"
|
|
10726
10742
|
};
|
|
10727
10743
|
const boxClassification = {
|
|
10728
|
-
fieldset: "max-w-md border border-gray-400 rounded-md px-2 pb-1",
|
|
10729
|
-
legend: "font-bold text-sm",
|
|
10730
|
-
wrapper: "flex items-center mb-1 cursor-pointer",
|
|
10731
|
-
help: "mb-2",
|
|
10732
|
-
input: "form-check-input appearance-none h-5 w-5 mr-2 border border-gray-500 rounded-sm bg-white checked:bg-blue-500 focus:outline-none focus:ring-0 transition duration-100",
|
|
10733
|
-
label: "text-sm text-gray-700"
|
|
10744
|
+
fieldset: "t-max-w-md t-border t-border-gray-400 t-rounded-md t-px-2 t-pb-1",
|
|
10745
|
+
legend: "t-font-bold t-text-sm",
|
|
10746
|
+
wrapper: "t-flex t-items-center t-mb-1 t-cursor-pointer",
|
|
10747
|
+
help: "t-mb-2",
|
|
10748
|
+
input: "t-form-check-input t-appearance-none t-h-5 t-w-5 t-mr-2 t-border t-border-gray-500 t-rounded-sm t-bg-white checked:t-bg-blue-500 focus:t-outline-none focus:t-ring-0 t-transition t-duration-100",
|
|
10749
|
+
label: "t-text-sm t-text-gray-700"
|
|
10734
10750
|
};
|
|
10735
10751
|
const buttonClassification = {
|
|
10736
|
-
wrapper: "mb-1",
|
|
10737
|
-
input: "bg-red-500 hover:bg-
|
|
10738
|
-
outer: "mb-0"
|
|
10752
|
+
wrapper: "t-mb-1",
|
|
10753
|
+
input: "t-bg-red-500 hover:t-bg-red-600 t-text-white t-text-lg t-font-normal t-py-4 t-px-7 sm:t-px-10 t-rounded",
|
|
10754
|
+
outer: "t-mb-0"
|
|
10739
10755
|
};
|
|
10740
10756
|
var theme = {
|
|
10741
10757
|
global: {
|
|
10742
|
-
outer: "mb-5 formkit-disabled:opacity-50",
|
|
10743
|
-
help: "text-xs text-gray-500",
|
|
10744
|
-
messages: "list-none p-0 mt-1 mb-0",
|
|
10745
|
-
message: "text-red-500 mb-1 text-xs"
|
|
10758
|
+
outer: "t-mb-5 formkit-disabled:t-opacity-50",
|
|
10759
|
+
help: "t-text-xs t-text-gray-500",
|
|
10760
|
+
messages: "t-list-none t-p-0 t-mt-1 t-mb-0",
|
|
10761
|
+
message: "t-text-red-500 t-mb-1 t-text-xs"
|
|
10746
10762
|
},
|
|
10747
10763
|
button: buttonClassification,
|
|
10748
10764
|
color: {
|
|
10749
|
-
label: "block mb-1 font-bold text-sm",
|
|
10750
|
-
input: "w-16 h-8 appearance-none cursor-pointer border border-gray-300 rounded-md mb-2 p-1"
|
|
10765
|
+
label: "t-block t-mb-1 t-font-bold t-text-sm",
|
|
10766
|
+
input: "t-w-16 t-h-8 t-appearance-none t-cursor-pointer t-border t-border-gray-300 t-rounded-md t-mb-2 t-p-1"
|
|
10751
10767
|
},
|
|
10752
10768
|
date: textClassification,
|
|
10753
10769
|
"datetime-local": textClassification,
|
|
10754
10770
|
checkbox: boxClassification,
|
|
10755
10771
|
email: textClassification,
|
|
10756
10772
|
file: {
|
|
10757
|
-
label: "block mb-1 font-bold text-sm",
|
|
10758
|
-
inner: "max-w-md cursor-pointer",
|
|
10759
|
-
input: "text-gray-600 text-sm mb-1 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:bg-blue-500 file:text-white hover:file:bg-blue-600",
|
|
10760
|
-
noFiles: "block text-gray-800 text-sm mb-1",
|
|
10761
|
-
fileItem: "block flex text-gray-800 text-sm mb-1",
|
|
10762
|
-
removeFiles: "ml-auto text-blue-500 text-sm"
|
|
10773
|
+
label: "t-block t-mb-1 t-font-bold t-text-sm",
|
|
10774
|
+
inner: "t-max-w-md t-cursor-pointer",
|
|
10775
|
+
input: "t-text-gray-600 t-text-sm t-mb-1 file:t-mr-4 file:t-py-2 file:t-px-4 file:t-rounded-full file:t-border-0 file:t-text-sm file:t-bg-blue-500 file:t-text-white hover:file:t-bg-blue-600",
|
|
10776
|
+
noFiles: "t-block t-text-gray-800 t-text-sm t-mb-1",
|
|
10777
|
+
fileItem: "t-block t-flex t-text-gray-800 t-text-sm mb-1",
|
|
10778
|
+
removeFiles: "t-ml-auto t-text-blue-500 t-text-sm"
|
|
10763
10779
|
},
|
|
10764
10780
|
month: textClassification,
|
|
10765
10781
|
number: textClassification,
|
|
10766
10782
|
password: textClassification,
|
|
10767
10783
|
radio: __spreadProps(__spreadValues({}, boxClassification), {
|
|
10768
|
-
input: boxClassification.input.replace("rounded-sm", "rounded-full")
|
|
10784
|
+
input: boxClassification.input.replace("t-rounded-sm", "t-rounded-full")
|
|
10769
10785
|
}),
|
|
10770
10786
|
range: {
|
|
10771
|
-
inner: "max-w-md",
|
|
10772
|
-
input: "form-range appearance-none w-full h-2 p-0 bg-gray-200 rounded-full focus:outline-none focus:ring-0 focus:shadow-none"
|
|
10787
|
+
inner: "t-max-w-md",
|
|
10788
|
+
input: "t-form-range t-appearance-none t-w-full t-h-2 t-p-0 t-bg-gray-200 t-rounded-full focus:t-outline-none focus:t-ring-0 focus:t-shadow-none"
|
|
10773
10789
|
},
|
|
10774
10790
|
search: textClassification,
|
|
10775
10791
|
select: textClassification,
|
|
@@ -10777,7 +10793,7 @@ var theme = {
|
|
|
10777
10793
|
tel: textClassification,
|
|
10778
10794
|
text: textClassification,
|
|
10779
10795
|
textarea: __spreadProps(__spreadValues({}, textClassification), {
|
|
10780
|
-
input: "block w-full h-32 px-3 pt-1 border-none text-base text-gray-700 placeholder-gray-400 placeholder:text-sm focus:shadow-outline"
|
|
10796
|
+
input: "t-block t-w-full t-h-32 t-px-3 t-pt-1 t-border-none t-text-base t-text-gray-700 t-placeholder-gray-400 placeholder:t-text-sm focus:t-shadow-outline"
|
|
10781
10797
|
}),
|
|
10782
10798
|
time: textClassification,
|
|
10783
10799
|
url: textClassification,
|