@planetaexo/design-system 0.5.0 → 0.5.2
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 +104 -93
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +104 -93
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4853,106 +4853,117 @@ function RegistrationForm({
|
|
|
4853
4853
|
/* @__PURE__ */ jsx("dd", { className: "text-foreground font-medium text-right min-w-0 break-words", children: traveller.fullName })
|
|
4854
4854
|
] })
|
|
4855
4855
|
] }) }),
|
|
4856
|
-
/* @__PURE__ */ jsx(
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
className: "mt-0.5 h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4894
|
-
}
|
|
4895
|
-
),
|
|
4896
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
4897
|
-
L.termsAccept,
|
|
4898
|
-
/* @__PURE__ */ jsx("span", { className: "text-primary ml-0.5", children: "*" })
|
|
4899
|
-
] })
|
|
4900
|
-
]
|
|
4901
|
-
}
|
|
4902
|
-
),
|
|
4903
|
-
termsError && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive font-ui", children: L.requiredFieldError })
|
|
4904
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
4905
|
-
/* @__PURE__ */ jsxs(
|
|
4906
|
-
"div",
|
|
4907
|
-
{
|
|
4908
|
-
role: "radiogroup",
|
|
4909
|
-
"aria-label": L.termsSectionTitle,
|
|
4910
|
-
className: "flex flex-wrap items-center gap-x-6 gap-y-3",
|
|
4911
|
-
children: [
|
|
4912
|
-
/* @__PURE__ */ jsxs(
|
|
4913
|
-
"label",
|
|
4914
|
-
{
|
|
4915
|
-
className: cn(
|
|
4916
|
-
"flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm",
|
|
4917
|
-
termsError ? "text-destructive" : "text-foreground"
|
|
4918
|
-
),
|
|
4919
|
-
children: [
|
|
4920
|
-
/* @__PURE__ */ jsx(
|
|
4921
|
-
"input",
|
|
4922
|
-
{
|
|
4923
|
-
type: "radio",
|
|
4924
|
-
name: "registration-terms-accept",
|
|
4925
|
-
checked: termsAccepted,
|
|
4926
|
-
required: true,
|
|
4927
|
-
disabled: readOnly,
|
|
4928
|
-
onChange: () => setField(TERMS_ACCEPT_KEY, true),
|
|
4929
|
-
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4930
|
-
}
|
|
4931
|
-
),
|
|
4932
|
-
L.termsAccept,
|
|
4933
|
-
/* @__PURE__ */ jsx("span", { className: "text-primary ml-0.5", children: "*" })
|
|
4934
|
-
]
|
|
4935
|
-
}
|
|
4856
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
4857
|
+
readOnly && [
|
|
4858
|
+
"opacity-50 select-none",
|
|
4859
|
+
"[&_input]:cursor-not-allowed",
|
|
4860
|
+
"[&_select]:cursor-not-allowed",
|
|
4861
|
+
"[&_textarea]:cursor-not-allowed",
|
|
4862
|
+
"[&_button]:cursor-not-allowed",
|
|
4863
|
+
"[&_label]:cursor-not-allowed"
|
|
4864
|
+
].join(" ")
|
|
4865
|
+
), children: /* @__PURE__ */ jsxs("div", { className: cn(readOnly && "pointer-events-none"), children: [
|
|
4866
|
+
/* @__PURE__ */ jsx(FormSection2, { title: L.detailsSectionTitle, children: sortedFields.map((field) => {
|
|
4867
|
+
var _a2;
|
|
4868
|
+
return /* @__PURE__ */ jsxs("div", { id: `rf-${field.id}`, className: "flex flex-col gap-1.5", children: [
|
|
4869
|
+
/* @__PURE__ */ jsx(
|
|
4870
|
+
FieldRenderer,
|
|
4871
|
+
{
|
|
4872
|
+
field,
|
|
4873
|
+
value: current[field.id],
|
|
4874
|
+
onChange: (v) => setField(field.id, v),
|
|
4875
|
+
defaultPhoneCountry,
|
|
4876
|
+
labels: L,
|
|
4877
|
+
error: fieldErrors[field.id],
|
|
4878
|
+
disabled: readOnly
|
|
4879
|
+
}
|
|
4880
|
+
),
|
|
4881
|
+
((_a2 = field.helpText) == null ? void 0 : _a2.trim()) && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground font-ui leading-relaxed", children: field.helpText.trim() })
|
|
4882
|
+
] }, field.id);
|
|
4883
|
+
}) }),
|
|
4884
|
+
termsEnabled && terms && /* @__PURE__ */ jsx("div", { id: "rf-terms", children: /* @__PURE__ */ jsxs(FormSection2, { title: L.termsSectionTitle, children: [
|
|
4885
|
+
/* @__PURE__ */ jsx("div", { className: "max-h-72 overflow-y-auto rounded-lg border border-border bg-muted/30 p-4", children: /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap text-sm leading-relaxed text-foreground font-ui", children: terms.markdown }) }),
|
|
4886
|
+
acceptControl === "checkbox" ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
4887
|
+
/* @__PURE__ */ jsxs(
|
|
4888
|
+
"label",
|
|
4889
|
+
{
|
|
4890
|
+
className: cn(
|
|
4891
|
+
"flex cursor-pointer items-start gap-2.5 font-ui text-sm",
|
|
4892
|
+
termsError ? "text-destructive" : "text-foreground"
|
|
4936
4893
|
),
|
|
4937
|
-
|
|
4894
|
+
children: [
|
|
4938
4895
|
/* @__PURE__ */ jsx(
|
|
4939
4896
|
"input",
|
|
4940
4897
|
{
|
|
4941
|
-
type: "
|
|
4942
|
-
|
|
4943
|
-
|
|
4898
|
+
type: "checkbox",
|
|
4899
|
+
checked: termsAccepted,
|
|
4900
|
+
required: true,
|
|
4944
4901
|
disabled: readOnly,
|
|
4945
|
-
onChange: () => setField(TERMS_ACCEPT_KEY,
|
|
4946
|
-
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4902
|
+
onChange: (e) => setField(TERMS_ACCEPT_KEY, e.target.checked),
|
|
4903
|
+
className: "mt-0.5 h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4947
4904
|
}
|
|
4948
4905
|
),
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4906
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
4907
|
+
L.termsAccept,
|
|
4908
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary ml-0.5", children: "*" })
|
|
4909
|
+
] })
|
|
4910
|
+
]
|
|
4911
|
+
}
|
|
4912
|
+
),
|
|
4913
|
+
termsError && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive font-ui", children: L.requiredFieldError })
|
|
4914
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
4915
|
+
/* @__PURE__ */ jsxs(
|
|
4916
|
+
"div",
|
|
4917
|
+
{
|
|
4918
|
+
role: "radiogroup",
|
|
4919
|
+
"aria-label": L.termsSectionTitle,
|
|
4920
|
+
className: "flex flex-wrap items-center gap-x-6 gap-y-3",
|
|
4921
|
+
children: [
|
|
4922
|
+
/* @__PURE__ */ jsxs(
|
|
4923
|
+
"label",
|
|
4924
|
+
{
|
|
4925
|
+
className: cn(
|
|
4926
|
+
"flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm",
|
|
4927
|
+
termsError ? "text-destructive" : "text-foreground"
|
|
4928
|
+
),
|
|
4929
|
+
children: [
|
|
4930
|
+
/* @__PURE__ */ jsx(
|
|
4931
|
+
"input",
|
|
4932
|
+
{
|
|
4933
|
+
type: "radio",
|
|
4934
|
+
name: "registration-terms-accept",
|
|
4935
|
+
checked: termsAccepted,
|
|
4936
|
+
required: true,
|
|
4937
|
+
disabled: readOnly,
|
|
4938
|
+
onChange: () => setField(TERMS_ACCEPT_KEY, true),
|
|
4939
|
+
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4940
|
+
}
|
|
4941
|
+
),
|
|
4942
|
+
L.termsAccept,
|
|
4943
|
+
/* @__PURE__ */ jsx("span", { className: "text-primary ml-0.5", children: "*" })
|
|
4944
|
+
]
|
|
4945
|
+
}
|
|
4946
|
+
),
|
|
4947
|
+
/* @__PURE__ */ jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-muted-foreground", children: [
|
|
4948
|
+
/* @__PURE__ */ jsx(
|
|
4949
|
+
"input",
|
|
4950
|
+
{
|
|
4951
|
+
type: "radio",
|
|
4952
|
+
name: "registration-terms-accept",
|
|
4953
|
+
checked: current[TERMS_ACCEPT_KEY] === false,
|
|
4954
|
+
disabled: readOnly,
|
|
4955
|
+
onChange: () => setField(TERMS_ACCEPT_KEY, false),
|
|
4956
|
+
className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
|
|
4957
|
+
}
|
|
4958
|
+
),
|
|
4959
|
+
L.termsDecline
|
|
4960
|
+
] })
|
|
4961
|
+
]
|
|
4962
|
+
}
|
|
4963
|
+
),
|
|
4964
|
+
termsError && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive font-ui", children: L.requiredFieldError })
|
|
4965
|
+
] })
|
|
4966
|
+
] }) })
|
|
4956
4967
|
] }) }),
|
|
4957
4968
|
error && /* @__PURE__ */ jsx("p", { role: "alert", className: "text-sm text-destructive font-ui", children: error }),
|
|
4958
4969
|
!readOnly && /* @__PURE__ */ jsx("div", { className: "flex justify-center pt-2", children: /* @__PURE__ */ jsx(
|