@planetaexo/design-system 0.20.0 → 0.22.0

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.d.cts CHANGED
@@ -1235,8 +1235,26 @@ interface RegistrationSuccessCardProps {
1235
1235
  * campos da interface são ignorados aqui.
1236
1236
  */
1237
1237
  labels?: RegistrationFormLabels;
1238
+ /**
1239
+ * Override de `break-inside` aplicado a TODAS as seções do card (Trip info,
1240
+ * Your answers, Terms). Default `"avoid"` preserva o comportamento legado
1241
+ * (cada seção tenta não quebrar). Em PDFs com muito conteúdo, passar `"auto"`
1242
+ * permite que as seções fluam naturalmente entre páginas — evita o caso em
1243
+ * que uma seção grande é empurrada inteira para a próxima página, deixando
1244
+ * espaço em branco na anterior.
1245
+ */
1246
+ sectionsBreakInside?: "auto" | "avoid";
1247
+ /**
1248
+ * Tipografia do conteúdo do parágrafo de Terms & Conditions.
1249
+ * - `"default"` (padrão): sans-serif (`font-ui`) — usado no fluxo web.
1250
+ * - `"compact-serif"`: serifada (`font-serif`) menor (`text-[8pt]`,
1251
+ * `leading-tight`) otimizada para PDF impresso/visualização A4.
1252
+ * Apenas o `<p>` do conteúdo é afetado — título da seção e badge
1253
+ * "Accepted/Not accepted" permanecem inalterados.
1254
+ */
1255
+ termsTypography?: "default" | "compact-serif";
1238
1256
  }
1239
- declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, showSuccessIcon, terms, termsLayout, termsLabels, adventure, booking, traveller, tripInfoLabels, density, submissionTimestamps, submissionTimestampsLabels, labels: scLabels, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
1257
+ declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, showSuccessIcon, terms, termsLayout, termsLabels, adventure, booking, traveller, tripInfoLabels, density, submissionTimestamps, submissionTimestampsLabels, labels: scLabels, sectionsBreakInside, termsTypography, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
1240
1258
 
1241
1259
  interface FloatingInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
1242
1260
  label: string;
package/dist/index.d.ts CHANGED
@@ -1235,8 +1235,26 @@ interface RegistrationSuccessCardProps {
1235
1235
  * campos da interface são ignorados aqui.
1236
1236
  */
1237
1237
  labels?: RegistrationFormLabels;
1238
+ /**
1239
+ * Override de `break-inside` aplicado a TODAS as seções do card (Trip info,
1240
+ * Your answers, Terms). Default `"avoid"` preserva o comportamento legado
1241
+ * (cada seção tenta não quebrar). Em PDFs com muito conteúdo, passar `"auto"`
1242
+ * permite que as seções fluam naturalmente entre páginas — evita o caso em
1243
+ * que uma seção grande é empurrada inteira para a próxima página, deixando
1244
+ * espaço em branco na anterior.
1245
+ */
1246
+ sectionsBreakInside?: "auto" | "avoid";
1247
+ /**
1248
+ * Tipografia do conteúdo do parágrafo de Terms & Conditions.
1249
+ * - `"default"` (padrão): sans-serif (`font-ui`) — usado no fluxo web.
1250
+ * - `"compact-serif"`: serifada (`font-serif`) menor (`text-[8pt]`,
1251
+ * `leading-tight`) otimizada para PDF impresso/visualização A4.
1252
+ * Apenas o `<p>` do conteúdo é afetado — título da seção e badge
1253
+ * "Accepted/Not accepted" permanecem inalterados.
1254
+ */
1255
+ termsTypography?: "default" | "compact-serif";
1238
1256
  }
1239
- declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, showSuccessIcon, terms, termsLayout, termsLabels, adventure, booking, traveller, tripInfoLabels, density, submissionTimestamps, submissionTimestampsLabels, labels: scLabels, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
1257
+ declare function RegistrationSuccessCard({ variant, title, message, answersTitle, fields, answers, dateFormatter, formatAnswer, className, actions, logo, logoAlt, showSuccessIcon, terms, termsLayout, termsLabels, adventure, booking, traveller, tripInfoLabels, density, submissionTimestamps, submissionTimestampsLabels, labels: scLabels, sectionsBreakInside, termsTypography, }: RegistrationSuccessCardProps): react_jsx_runtime.JSX.Element;
1240
1258
 
1241
1259
  interface FloatingInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
1242
1260
  label: string;
package/dist/index.js CHANGED
@@ -5160,13 +5160,14 @@ function formatDateRange(adventure, fmt) {
5160
5160
  function FormSection2({
5161
5161
  title,
5162
5162
  children,
5163
- className
5163
+ className,
5164
+ breakInside = "avoid"
5164
5165
  }) {
5165
5166
  return /* @__PURE__ */ jsxs(
5166
5167
  "div",
5167
5168
  {
5168
5169
  className: cn("flex flex-col gap-5", className),
5169
- style: { breakInside: "avoid" },
5170
+ style: { breakInside },
5170
5171
  children: [
5171
5172
  /* @__PURE__ */ jsxs(
5172
5173
  "div",
@@ -6102,7 +6103,9 @@ function RegistrationSuccessCard({
6102
6103
  density = "comfortable",
6103
6104
  submissionTimestamps,
6104
6105
  submissionTimestampsLabels,
6105
- labels: scLabels
6106
+ labels: scLabels,
6107
+ sectionsBreakInside = "avoid",
6108
+ termsTypography = "default"
6106
6109
  }) {
6107
6110
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
6108
6111
  const isMinimal = variant === "minimal";
@@ -6167,7 +6170,7 @@ function RegistrationSuccessCard({
6167
6170
  /* @__PURE__ */ jsx("span", { className: "tabular-nums", children: submissionTimestamps.lastUpdatedAt })
6168
6171
  ] })
6169
6172
  ] }),
6170
- hasTripInfo && /* @__PURE__ */ jsx(FormSection2, { title: TL.sectionTitle, children: /* @__PURE__ */ jsxs("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: [
6173
+ hasTripInfo && /* @__PURE__ */ jsx(FormSection2, { title: TL.sectionTitle, breakInside: sectionsBreakInside, children: /* @__PURE__ */ jsxs("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: [
6171
6174
  adventure && /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-4", children: [
6172
6175
  /* @__PURE__ */ jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: TL.adventureLabel }),
6173
6176
  /* @__PURE__ */ jsx("dd", { className: "w-1/2 text-foreground font-medium text-right min-w-0 break-words", children: adventure.name })
@@ -6189,7 +6192,7 @@ function RegistrationSuccessCard({
6189
6192
  /* @__PURE__ */ jsx("dd", { className: "w-1/2 text-foreground font-medium text-right min-w-0 break-words", children: traveller.fullName })
6190
6193
  ] })
6191
6194
  ] }) }),
6192
- sorted.length > 0 && /* @__PURE__ */ jsx(FormSection2, { title: answersTitle, children: /* @__PURE__ */ jsx("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: sorted.map((f) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-4", children: [
6195
+ sorted.length > 0 && /* @__PURE__ */ jsx(FormSection2, { title: answersTitle, breakInside: sectionsBreakInside, children: /* @__PURE__ */ jsx("dl", { className: "flex flex-col gap-y-3 text-sm font-ui", children: sorted.map((f) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-x-4", children: [
6193
6196
  /* @__PURE__ */ jsx("dt", { className: "w-1/2 text-muted-foreground break-words", children: f.label }),
6194
6197
  /* @__PURE__ */ jsx("dd", { className: "w-1/2 text-foreground text-right min-w-0 break-words", children: (formatAnswer != null ? formatAnswer : ((field, v) => defaultFormatAnswer(field, v, dateFormatter, {
6195
6198
  yesLabel: scLabels == null ? void 0 : scLabels.yesLabel,
@@ -6199,7 +6202,7 @@ function RegistrationSuccessCard({
6199
6202
  answers[f.id]
6200
6203
  ) })
6201
6204
  ] }, f.id)) }) }),
6202
- !isMinimal && terms && /* @__PURE__ */ jsx(FormSection2, { title: (_j = termsLabels == null ? void 0 : termsLabels.title) != null ? _j : "Terms & Conditions", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 text-sm font-ui", children: [
6205
+ !isMinimal && terms && /* @__PURE__ */ jsx(FormSection2, { title: (_j = termsLabels == null ? void 0 : termsLabels.title) != null ? _j : "Terms & Conditions", breakInside: sectionsBreakInside, children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 text-sm font-ui", children: [
6203
6206
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
6204
6207
  /* @__PURE__ */ jsx("div", { className: cn(
6205
6208
  "inline-flex h-5 w-5 items-center justify-center rounded-full text-white text-xs font-bold",
@@ -6219,8 +6222,8 @@ function RegistrationSuccessCard({
6219
6222
  "p",
6220
6223
  {
6221
6224
  className: cn(
6222
- "whitespace-pre-wrap break-words text-foreground font-ui",
6223
- isCompact ? "text-xs leading-snug" : "text-sm leading-relaxed"
6225
+ "whitespace-pre-wrap break-words text-foreground",
6226
+ termsTypography === "compact-serif" ? "font-serif text-[8pt] leading-tight" : cn("font-ui", isCompact ? "text-xs leading-snug" : "text-sm leading-relaxed")
6224
6227
  ),
6225
6228
  children: terms.markdown
6226
6229
  }