formica-ui-lib 1.0.340 → 1.0.341
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.cjs +1 -1
- package/dist/index.js +95 -71
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9636,28 +9636,43 @@ var Zo = ({ id: e, name: t, type: n = "text", value: r = "", placeholder: i = ""
|
|
|
9636
9636
|
}) : null
|
|
9637
9637
|
]
|
|
9638
9638
|
});
|
|
9639
|
-
}, $ = ({ id: e, label: t, errorMessage: n, hasError:
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
className: "flex
|
|
9643
|
-
children: [
|
|
9644
|
-
|
|
9645
|
-
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9639
|
+
}, $ = ({ id: e, label: t, errorMessage: n, hasError: i = !1, linkText: a, linkHref: o, onLinkClick: s, ariaDescribedBy: c, ...d }) => {
|
|
9640
|
+
let f = r(), p = i && !!n, m = `${e || f}-field-error`, h = [c, p ? m : void 0].filter(Boolean).join(" ") || void 0;
|
|
9641
|
+
return /* @__PURE__ */ u("div", {
|
|
9642
|
+
className: "flex w-full flex-col gap-2",
|
|
9643
|
+
children: [
|
|
9644
|
+
t || a ? /* @__PURE__ */ u("div", {
|
|
9645
|
+
className: "flex items-center justify-between gap-4",
|
|
9646
|
+
children: [t ? /* @__PURE__ */ l(v, {
|
|
9647
|
+
as: "label",
|
|
9648
|
+
htmlFor: e,
|
|
9649
|
+
id: p ? m : void 0,
|
|
9650
|
+
className: `text-sm ${i ? "text-accent!" : "text-primary"}`,
|
|
9651
|
+
children: p ? n : t
|
|
9652
|
+
}) : /* @__PURE__ */ l("span", {}), a ? /* @__PURE__ */ l(v, {
|
|
9653
|
+
as: "a",
|
|
9654
|
+
href: o || "#",
|
|
9655
|
+
onClick: s,
|
|
9656
|
+
className: "text-xs text-secondaryActive underline underline-offset-2",
|
|
9657
|
+
children: a
|
|
9658
|
+
}) : null]
|
|
9659
|
+
}) : null,
|
|
9660
|
+
/* @__PURE__ */ l(Zo, {
|
|
9661
|
+
id: e,
|
|
9662
|
+
hasError: i,
|
|
9663
|
+
...d,
|
|
9664
|
+
ariaDescribedBy: h
|
|
9665
|
+
}),
|
|
9666
|
+
!t && p ? /* @__PURE__ */ l(v, {
|
|
9667
|
+
id: m,
|
|
9668
|
+
role: "alert",
|
|
9669
|
+
variant: "free",
|
|
9670
|
+
className: "text-sm text-accent",
|
|
9671
|
+
children: n
|
|
9672
|
+
}) : null
|
|
9673
|
+
]
|
|
9674
|
+
});
|
|
9675
|
+
}, zl = ({ title: e = "Personal & Project Information", idPrefix: t = "salesforce-customer", firstName: n = "", lastName: r = "", profession: i = "", companyName: a = "", projectType: o = "", projectSquareMetres: s = "", projectName: c = "", projectDetails: d = "", phoneNumber: f = "", email: p = "", confirmEmail: m = "", firstNamePlaceholder: h = "First Name*", lastNamePlaceholder: g = "Last Name*", professionPlaceholder: _ = "Profession*", companyNamePlaceholder: y = "Company Name*", projectTypePlaceholder: b = "Project Type", projectSquareMetresPlaceholder: x = "Project Square Metres", projectNamePlaceholder: S = "Project Name", projectDetailsPlaceholder: C = "Project Details", phoneNumberPlaceholder: w = "Phone Number*", emailPlaceholder: T = "Email*", confirmEmailPlaceholder: E = "Confirm Email*", professionOptions: D = [], projectTypeOptions: O = [], projectSquareMetresOptions: k = [], errors: A = {}, onFirstNameChange: j, onLastNameChange: M, onProfessionChange: N, onCompanyNameChange: P, onProjectTypeChange: F, onProjectSquareMetresChange: I, onProjectNameChange: L, onProjectDetailsChange: R, onPhoneNumberChange: z, onEmailChange: B, onConfirmEmailChange: V }) => /* @__PURE__ */ u("section", {
|
|
9661
9676
|
className: "flex flex-col gap-6",
|
|
9662
9677
|
children: [/* @__PURE__ */ l(v, {
|
|
9663
9678
|
as: "h2",
|
|
@@ -13792,60 +13807,69 @@ var ld = (e, t = [], n = null) => t.map((t) => e[t]).filter((e) => !!e).map((e)
|
|
|
13792
13807
|
})
|
|
13793
13808
|
]
|
|
13794
13809
|
});
|
|
13795
|
-
}, ef = ({ paymentTypeTitle: e = "Select Payment Type", paymentTypeSelectorProps: t, cardNumber: n = "", expirationDate: r = "", securityCode: i = "", errors: a = {},
|
|
13810
|
+
}, ef = ({ paymentTypeTitle: e = "Select Payment Type", paymentTypeSelectorProps: t, cardNumber: n = "", expirationDate: r = "", securityCode: i = "", errors: a = {}, submitError: o, onCardNumberChange: s, onExpirationDateChange: c, onSecurityCodeChange: d, onCardNumberBlur: f, onExpirationDateBlur: p, onSecurityCodeBlur: m }) => /* @__PURE__ */ u("section", {
|
|
13796
13811
|
className: "flex w-full flex-col gap-6",
|
|
13797
|
-
children: [
|
|
13798
|
-
|
|
13799
|
-
|
|
13800
|
-
|
|
13801
|
-
|
|
13802
|
-
|
|
13803
|
-
|
|
13804
|
-
|
|
13805
|
-
|
|
13806
|
-
|
|
13807
|
-
|
|
13808
|
-
|
|
13809
|
-
name: "cardNumber",
|
|
13810
|
-
placeholder: "Card Number",
|
|
13811
|
-
ariaLabel: "Card number",
|
|
13812
|
-
mask: "cardNumber",
|
|
13813
|
-
autoComplete: "cc-number",
|
|
13814
|
-
value: n,
|
|
13815
|
-
hasError: !!a.cardNumber,
|
|
13816
|
-
errorMessage: a.cardNumber,
|
|
13817
|
-
onChange: o,
|
|
13818
|
-
onBlur: d
|
|
13819
|
-
}), /* @__PURE__ */ u("div", {
|
|
13820
|
-
className: "grid grid-cols-2 gap-4",
|
|
13812
|
+
children: [
|
|
13813
|
+
/* @__PURE__ */ u("div", {
|
|
13814
|
+
className: "flex flex-col gap-3",
|
|
13815
|
+
children: [/* @__PURE__ */ l(v, {
|
|
13816
|
+
as: "h2",
|
|
13817
|
+
variant: "bold",
|
|
13818
|
+
className: "text-primary",
|
|
13819
|
+
children: e
|
|
13820
|
+
}), /* @__PURE__ */ l(qd, { ...t })]
|
|
13821
|
+
}),
|
|
13822
|
+
/* @__PURE__ */ u("div", {
|
|
13823
|
+
className: "mt-10 flex flex-col gap-4",
|
|
13821
13824
|
children: [/* @__PURE__ */ l($, {
|
|
13822
|
-
id: "payment-
|
|
13823
|
-
name: "
|
|
13824
|
-
placeholder: "
|
|
13825
|
-
ariaLabel: "
|
|
13826
|
-
mask: "
|
|
13827
|
-
autoComplete: "cc-
|
|
13828
|
-
value:
|
|
13829
|
-
hasError: !!a.
|
|
13830
|
-
errorMessage: a.
|
|
13825
|
+
id: "payment-card-number",
|
|
13826
|
+
name: "cardNumber",
|
|
13827
|
+
placeholder: "Card Number",
|
|
13828
|
+
ariaLabel: "Card number",
|
|
13829
|
+
mask: "cardNumber",
|
|
13830
|
+
autoComplete: "cc-number",
|
|
13831
|
+
value: n,
|
|
13832
|
+
hasError: !!a.cardNumber,
|
|
13833
|
+
errorMessage: a.cardNumber,
|
|
13831
13834
|
onChange: s,
|
|
13832
13835
|
onBlur: f
|
|
13833
|
-
}), /* @__PURE__ */
|
|
13834
|
-
|
|
13835
|
-
|
|
13836
|
-
|
|
13837
|
-
|
|
13838
|
-
|
|
13839
|
-
|
|
13840
|
-
|
|
13841
|
-
|
|
13842
|
-
|
|
13843
|
-
|
|
13844
|
-
|
|
13845
|
-
|
|
13836
|
+
}), /* @__PURE__ */ u("div", {
|
|
13837
|
+
className: "grid grid-cols-2 gap-4",
|
|
13838
|
+
children: [/* @__PURE__ */ l($, {
|
|
13839
|
+
id: "payment-expiration-date",
|
|
13840
|
+
name: "expirationDate",
|
|
13841
|
+
placeholder: "MM/YY",
|
|
13842
|
+
ariaLabel: "Expiration date (MM/YY)",
|
|
13843
|
+
mask: "expirationDate",
|
|
13844
|
+
autoComplete: "cc-exp",
|
|
13845
|
+
value: r,
|
|
13846
|
+
hasError: !!a.expirationDate,
|
|
13847
|
+
errorMessage: a.expirationDate,
|
|
13848
|
+
onChange: c,
|
|
13849
|
+
onBlur: p
|
|
13850
|
+
}), /* @__PURE__ */ l($, {
|
|
13851
|
+
id: "payment-security-code",
|
|
13852
|
+
name: "securityCode",
|
|
13853
|
+
placeholder: "CVC",
|
|
13854
|
+
ariaLabel: "Security code (3 or 4 digits)",
|
|
13855
|
+
mask: "digits",
|
|
13856
|
+
maxDigits: 4,
|
|
13857
|
+
autoComplete: "cc-csc",
|
|
13858
|
+
value: i,
|
|
13859
|
+
hasError: !!a.securityCode,
|
|
13860
|
+
errorMessage: a.securityCode,
|
|
13861
|
+
onChange: d,
|
|
13862
|
+
onBlur: m
|
|
13863
|
+
})]
|
|
13846
13864
|
})]
|
|
13847
|
-
})
|
|
13848
|
-
|
|
13865
|
+
}),
|
|
13866
|
+
o ? /* @__PURE__ */ l(v, {
|
|
13867
|
+
role: "alert",
|
|
13868
|
+
variant: "free",
|
|
13869
|
+
className: "rounded-md border border-accent bg-accent/10 p-4 text-sm text-accent",
|
|
13870
|
+
children: o
|
|
13871
|
+
}) : null
|
|
13872
|
+
]
|
|
13849
13873
|
}), tf = ({ requiresPayment: e = !0, shippingMethodSelectorProps: t, cartPaymentPanelProps: n, checkoutProgressIndicatorProps: r, cartTotalsPanelProps: i }) => /* @__PURE__ */ l("section", {
|
|
13850
13874
|
className: "w-full flex justify-center mt-10 pb-16",
|
|
13851
13875
|
children: /* @__PURE__ */ u("div", {
|