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