pixelon 0.9.0 → 0.9.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.js CHANGED
@@ -13206,19 +13206,19 @@ function mapFieldsToFormFields(fields, mode) {
13206
13206
  }));
13207
13207
  }
13208
13208
 
13209
- const CLASS$g = `${COMPONENT_PREFIX}field-value`;
13209
+ const CLASS$h = `${COMPONENT_PREFIX}field-value`;
13210
13210
  const FieldValue = ({
13211
13211
  label,
13212
13212
  children,
13213
13213
  layout = "inline",
13214
13214
  className
13215
- }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [CLASS$g, `${CLASS$g}--${layout}`, className].filter(Boolean).join(" "), children: [
13216
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$g}__label`, children: label }),
13217
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$g}__value`, children })
13215
+ }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [CLASS$h, `${CLASS$h}--${layout}`, className].filter(Boolean).join(" "), children: [
13216
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$h}__label`, children: label }),
13217
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$h}__value`, children })
13218
13218
  ] });
13219
13219
  FieldValue.displayName = "FieldValue";
13220
13220
 
13221
- const CLASS$f = `${COMPONENT_PREFIX}record-card`;
13221
+ const CLASS$g = `${COMPONENT_PREFIX}record-card`;
13222
13222
  const RecordCard = ({
13223
13223
  title,
13224
13224
  summary,
@@ -13230,20 +13230,20 @@ const RecordCard = ({
13230
13230
  className
13231
13231
  }) => {
13232
13232
  const cuerpoId = React.useId();
13233
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [CLASS$f, open ? `${CLASS$f}--open` : "", className].filter(Boolean).join(" "), children: [
13233
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: [CLASS$g, open ? `${CLASS$g}--open` : "", className].filter(Boolean).join(" "), children: [
13234
13234
  /* @__PURE__ */ jsxRuntime.jsxs(
13235
13235
  "button",
13236
13236
  {
13237
13237
  type: "button",
13238
- className: `${CLASS$f}__header`,
13238
+ className: `${CLASS$g}__header`,
13239
13239
  "aria-expanded": open,
13240
13240
  "aria-controls": cuerpoId,
13241
13241
  "aria-label": ariaLabel,
13242
13242
  onClick: onToggle,
13243
13243
  children: [
13244
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$f}__heading`, children: [
13245
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$f}__title`, children: title }),
13246
- summary && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$f}__summary`, children: summary })
13244
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$g}__heading`, children: [
13245
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$g}__title`, children: title }),
13246
+ summary && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$g}__summary`, children: summary })
13247
13247
  ] }),
13248
13248
  /* @__PURE__ */ jsxRuntime.jsx(
13249
13249
  Icon,
@@ -13251,22 +13251,22 @@ const RecordCard = ({
13251
13251
  type: open ? "chevron-up" : "chevron-down",
13252
13252
  width: 18,
13253
13253
  height: 18,
13254
- className: `${CLASS$f}__chevron`,
13254
+ className: `${CLASS$g}__chevron`,
13255
13255
  "aria-hidden": true
13256
13256
  }
13257
13257
  )
13258
13258
  ]
13259
13259
  }
13260
13260
  ),
13261
- open && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$f}__body`, id: cuerpoId, children: [
13261
+ open && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$g}__body`, id: cuerpoId, children: [
13262
13262
  children,
13263
- actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$f}__actions`, children: actions })
13263
+ actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$g}__actions`, children: actions })
13264
13264
  ] })
13265
13265
  ] });
13266
13266
  };
13267
13267
  RecordCard.displayName = "RecordCard";
13268
13268
 
13269
- const CLASS$e = `${COMPONENT_PREFIX}crud-cards`;
13269
+ const CLASS$f = `${COMPONENT_PREFIX}crud-cards`;
13270
13270
  function summaryFields(fields) {
13271
13271
  const visibles = fields.filter((f) => f.showInTable !== false);
13272
13272
  const marcados = visibles.filter((f) => f.summary);
@@ -13285,13 +13285,13 @@ function CardList({
13285
13285
  const claveResumen = new Set(resumen.map((f) => f.key));
13286
13286
  const cuerpo = fields.filter((f) => f.showInTable !== false && !claveResumen.has(f.key));
13287
13287
  if (loading && rows.length === 0) {
13288
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$e}__estado`, children: "Cargando..." });
13288
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$f}__estado`, children: "Cargando..." });
13289
13289
  }
13290
13290
  if (rows.length === 0) {
13291
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$e}__estado`, children: emptyText });
13291
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$f}__estado`, children: emptyText });
13292
13292
  }
13293
13293
  const [principal, ...secundarios] = resumen;
13294
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: CLASS$e, children: rows.map((row) => {
13294
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: CLASS$f, children: rows.map((row) => {
13295
13295
  const key = rowKey(row);
13296
13296
  const opciones = buildOptions?.(row) ?? [];
13297
13297
  const titulo = principal ? renderFieldValue(principal, row) : key;
@@ -13308,14 +13308,14 @@ function CardList({
13308
13308
  {
13309
13309
  type: "button",
13310
13310
  className: [
13311
- `${CLASS$e}__accion`,
13311
+ `${CLASS$f}__accion`,
13312
13312
  o.disabled && o.disabledReason ? "is-con-motivo" : ""
13313
13313
  ].filter(Boolean).join(" "),
13314
13314
  disabled: o.disabled,
13315
13315
  onClick: () => void o.onClick(),
13316
13316
  children: [
13317
13317
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: o.label }),
13318
- o.disabled && o.disabledReason && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$e}__motivo`, children: o.disabledReason })
13318
+ o.disabled && o.disabledReason && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$f}__motivo`, children: o.disabledReason })
13319
13319
  ]
13320
13320
  },
13321
13321
  o.label
@@ -13330,7 +13330,7 @@ function CardList({
13330
13330
  }
13331
13331
  CardList.displayName = "CardList";
13332
13332
 
13333
- const CLASS$d = `${COMPONENT_PREFIX}crud-scroll-end`;
13333
+ const CLASS$e = `${COMPONENT_PREFIX}crud-scroll-end`;
13334
13334
  const MARGEN = 24;
13335
13335
  const SELECTOR_CRUD = `.${COMPONENT_PREFIX}table-container, .${COMPONENT_PREFIX}crud-cards`;
13336
13336
  const ScrollToEnd = ({
@@ -13374,7 +13374,7 @@ const ScrollToEnd = ({
13374
13374
  s.scrollTo({ top: s.scrollHeight, behavior: "smooth" });
13375
13375
  }, []);
13376
13376
  if (!visible) return null;
13377
- return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: CLASS$d, onClick: alFinal, "aria-label": label, title: label, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "chevron-down", width: 18, height: 18, "aria-hidden": true }) });
13377
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: CLASS$e, onClick: alFinal, "aria-label": label, title: label, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: "chevron-down", width: 18, height: 18, "aria-hidden": true }) });
13378
13378
  };
13379
13379
  ScrollToEnd.displayName = "ScrollToEnd";
13380
13380
 
@@ -14059,7 +14059,7 @@ function Crud({
14059
14059
  }
14060
14060
  Crud.displayName = "Crud";
14061
14061
 
14062
- const CLASS$c = "px-chat-reactive-crud__chat-link";
14062
+ const CLASS$d = "px-chat-reactive-crud__chat-link";
14063
14063
  function Burbuja() {
14064
14064
  return /* @__PURE__ */ jsxRuntime.jsx(
14065
14065
  "svg",
@@ -14086,7 +14086,7 @@ const ChatLinkCell = ({
14086
14086
  if (targets.length === 1) {
14087
14087
  const t = targets[0];
14088
14088
  const texto = t.label ? `Abrir chat ${t.label}` : "Abrir chat";
14089
- return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: CLASS$c, "aria-label": texto, title: texto, onClick: () => abrir(t.id), children: /* @__PURE__ */ jsxRuntime.jsx(Burbuja, {}) });
14089
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: CLASS$d, "aria-label": texto, title: texto, onClick: () => abrir(t.id), children: /* @__PURE__ */ jsxRuntime.jsx(Burbuja, {}) });
14090
14090
  }
14091
14091
  return /* @__PURE__ */ jsxRuntime.jsx(
14092
14092
  DropdownMenu,
@@ -14100,7 +14100,7 @@ const ChatLinkCell = ({
14100
14100
  "button",
14101
14101
  {
14102
14102
  type: "button",
14103
- className: CLASS$c,
14103
+ className: CLASS$d,
14104
14104
  "aria-label": `Abrir chat (${targets.length} conversaciones)`,
14105
14105
  title: "Abrir chat",
14106
14106
  children: /* @__PURE__ */ jsxRuntime.jsx(Burbuja, {})
@@ -14417,7 +14417,7 @@ function uploadViaEventBus(eventBus, file, fileType) {
14417
14417
  });
14418
14418
  }
14419
14419
 
14420
- const CLASS$b = `${COMPONENT_PREFIX$1}file-field`;
14420
+ const CLASS$c = `${COMPONENT_PREFIX$1}file-field`;
14421
14421
  function iconoPorNombre(nombre) {
14422
14422
  const ext = nombre.split(".").pop()?.toLowerCase() ?? "";
14423
14423
  if (["png", "jpg", "jpeg", "gif", "webp", "heic", "heif"].includes(ext)) return ICON_TYPES.IMAGE;
@@ -14448,18 +14448,18 @@ const FileField = ({
14448
14448
  const elegir = () => {
14449
14449
  if (!disabled) inputRef.current?.click();
14450
14450
  };
14451
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$b}${error ? ` ${CLASS$b}--error` : ""}`, children: [
14452
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$b}__label`, children: [
14451
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$c}${error ? ` ${CLASS$c}--error` : ""}`, children: [
14452
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$c}__label`, children: [
14453
14453
  label,
14454
14454
  required ? " *" : "",
14455
14455
  multiple && hechos > 0 ? ` (${hechos})` : ""
14456
14456
  ] }),
14457
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$b}__box`, children: [
14457
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$c}__box`, children: [
14458
14458
  /* @__PURE__ */ jsxRuntime.jsx(
14459
14459
  "input",
14460
14460
  {
14461
14461
  ref: inputRef,
14462
- className: `${CLASS$b}__native`,
14462
+ className: `${CLASS$c}__native`,
14463
14463
  type: "file",
14464
14464
  accept,
14465
14465
  multiple,
@@ -14470,14 +14470,14 @@ const FileField = ({
14470
14470
  }
14471
14471
  }
14472
14472
  ),
14473
- /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: `${CLASS$b}__pick`, onClick: elegir, disabled, children: [
14473
+ /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: `${CLASS$c}__pick`, onClick: elegir, disabled, children: [
14474
14474
  /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: ICON_TYPES.UPLOAD, size: "small" }),
14475
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$b}__pick-text`, children: entries.length === 0 ? multiple ? "Toca para elegir archivos" : "Toca para elegir un archivo" : multiple ? "A\xF1adir m\xE1s" : "Cambiar archivo" })
14475
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$c}__pick-text`, children: entries.length === 0 ? multiple ? "Toca para elegir archivos" : "Toca para elegir un archivo" : multiple ? "A\xF1adir m\xE1s" : "Cambiar archivo" })
14476
14476
  ] }),
14477
- entries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$b}__list`, children: entries.map((e, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$b}__item ${CLASS$b}__item--${e.status}`, children: [
14478
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$b}__kind`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: iconoPorNombre(e.name), size: "small" }) }),
14479
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$b}__name`, children: e.name }),
14480
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$b}__state`, children: [
14477
+ entries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$c}__list`, children: entries.map((e, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$c}__item ${CLASS$c}__item--${e.status}`, children: [
14478
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$c}__kind`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: iconoPorNombre(e.name), size: "small" }) }),
14479
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$c}__name`, children: e.name }),
14480
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$c}__state`, children: [
14481
14481
  e.status === "uploading" && "Subiendo\u2026",
14482
14482
  e.status === "done" && (pesoLegible(e.size) || "Listo"),
14483
14483
  e.status === "error" && "No se pudo subir"
@@ -14486,7 +14486,7 @@ const FileField = ({
14486
14486
  "button",
14487
14487
  {
14488
14488
  type: "button",
14489
- className: `${CLASS$b}__remove`,
14489
+ className: `${CLASS$c}__remove`,
14490
14490
  onClick: () => onRemove(i),
14491
14491
  "aria-label": `Quitar ${e.name}`,
14492
14492
  disabled,
@@ -14495,8 +14495,8 @@ const FileField = ({
14495
14495
  )
14496
14496
  ] }, `${e.name}-${i}`)) })
14497
14497
  ] }),
14498
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__error`, children: error }),
14499
- !error && subiendo && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__hint`, children: "Espera a que terminen de subir." })
14498
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$c}__error`, children: error }),
14499
+ !error && subiendo && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$c}__hint`, children: "Espera a que terminen de subir." })
14500
14500
  ] });
14501
14501
  };
14502
14502
 
@@ -15652,7 +15652,7 @@ function buildMarkerIcon(name, color = "#dc2626", heading = 0) {
15652
15652
  return `data:image/svg+xml;charset=UTF-8,${encodeURIComponent(svg)}`;
15653
15653
  }
15654
15654
 
15655
- const CLASS$a = `${COMPONENT_PREFIX$1}map-view`;
15655
+ const CLASS$b = `${COMPONENT_PREFIX$1}map-view`;
15656
15656
  const DEFAULT_CENTER = { lat: 4.711, lng: -74.0721 };
15657
15657
  const DEFAULT_ZOOM = 12;
15658
15658
  const DEFAULT_HEIGHT$1 = 320;
@@ -15953,23 +15953,23 @@ const MapView = ({
15953
15953
  document.body.style.overflow = prev;
15954
15954
  };
15955
15955
  }, [expanded]);
15956
- const rootClass = [CLASS$a, fullBleed && `${CLASS$a}--full-bleed`, className].filter(Boolean).join(" ");
15956
+ const rootClass = [CLASS$b, fullBleed && `${CLASS$b}--full-bleed`, className].filter(Boolean).join(" ");
15957
15957
  if (overQuota) {
15958
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__state ${CLASS$a}__state--error`, children: labels?.quotaText ?? "Se alcanz\xF3 el l\xEDmite diario de uso del mapa. Intenta ma\xF1ana." }) });
15958
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__state ${CLASS$b}__state--error`, children: labels?.quotaText ?? "Se alcanz\xF3 el l\xEDmite diario de uso del mapa. Intenta ma\xF1ana." }) });
15959
15959
  }
15960
15960
  if (status === "error") {
15961
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__state ${CLASS$a}__state--error`, children: labels?.errorText ?? "No se pudo cargar el mapa." }) });
15961
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: rootClass, style: { height }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__state ${CLASS$b}__state--error`, children: labels?.errorText ?? "No se pudo cargar el mapa." }) });
15962
15962
  }
15963
15963
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: rootClass, style: fullBleed ? void 0 : { height }, children: [
15964
- status !== "ready" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__state`, children: labels?.loadingText ?? "Cargando mapa\u2026" }),
15965
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: nodeRef, className: `${CLASS$a}__canvas`, "aria-label": "Mapa", role: "application" }),
15966
- status === "ready" && list.length === 0 && allRoutes.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__empty`, children: labels?.emptyText ?? "Sin ubicaciones para mostrar" }),
15967
- status === "ready" && onPointMove && list.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__empty`, children: labels?.moveHint ?? "Arrastra el pin o toca el mapa para ajustar" }),
15964
+ status !== "ready" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__state`, children: labels?.loadingText ?? "Cargando mapa\u2026" }),
15965
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ref: nodeRef, className: `${CLASS$b}__canvas`, "aria-label": "Mapa", role: "application" }),
15966
+ status === "ready" && list.length === 0 && allRoutes.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__empty`, children: labels?.emptyText ?? "Sin ubicaciones para mostrar" }),
15967
+ status === "ready" && onPointMove && list.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$b}__empty`, children: labels?.moveHint ?? "Arrastra el pin o toca el mapa para ajustar" }),
15968
15968
  status === "ready" && expandable && !fullBleed && /* @__PURE__ */ jsxRuntime.jsx(
15969
15969
  "button",
15970
15970
  {
15971
15971
  type: "button",
15972
- className: `${CLASS$a}__expand`,
15972
+ className: `${CLASS$b}__expand`,
15973
15973
  "aria-label": labels?.expandAria ?? "Ver el mapa en pantalla completa",
15974
15974
  title: labels?.expandAria ?? "Pantalla completa",
15975
15975
  onClick: () => setExpanded(true),
@@ -15977,7 +15977,7 @@ const MapView = ({
15977
15977
  }
15978
15978
  ),
15979
15979
  expanded && ReactDOM.createPortal(
15980
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$a}-fs`, role: "dialog", "aria-modal": "true", "aria-label": "Mapa", children: [
15980
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$b}-fs`, role: "dialog", "aria-modal": "true", "aria-label": "Mapa", children: [
15981
15981
  /* @__PURE__ */ jsxRuntime.jsx(
15982
15982
  MapView,
15983
15983
  {
@@ -15991,7 +15991,7 @@ const MapView = ({
15991
15991
  "button",
15992
15992
  {
15993
15993
  type: "button",
15994
- className: `${CLASS$a}-fs__close`,
15994
+ className: `${CLASS$b}-fs__close`,
15995
15995
  "aria-label": labels?.closeAria ?? "Cerrar el mapa",
15996
15996
  onClick: () => setExpanded(false),
15997
15997
  children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
@@ -16107,7 +16107,7 @@ function reverseGeocode(lat, lng) {
16107
16107
  });
16108
16108
  }
16109
16109
 
16110
- const CLASS$9 = `${COMPONENT_PREFIX$1}location-field`;
16110
+ const CLASS$a = `${COMPONENT_PREFIX$1}location-field`;
16111
16111
  const GPS_TIMEOUT_MS = 1e4;
16112
16112
  const CONFIRM_MAP_HEIGHT = 180;
16113
16113
  const LocationField = ({
@@ -16180,16 +16180,16 @@ const LocationField = ({
16180
16180
  }
16181
16181
  };
16182
16182
  const hasPoint = value?.lat != null && value?.lng != null;
16183
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$9}${error ? ` ${CLASS$9}--error` : ""}`, ref: boxRef, children: [
16184
- label && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$9}__label`, children: [
16183
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$a}${error ? ` ${CLASS$a}--error` : ""}`, ref: boxRef, children: [
16184
+ label && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$a}__label`, children: [
16185
16185
  label,
16186
16186
  required ? " *" : ""
16187
16187
  ] }),
16188
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$9}__row`, children: [
16188
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$a}__row`, children: [
16189
16189
  /* @__PURE__ */ jsxRuntime.jsx(
16190
16190
  "input",
16191
16191
  {
16192
- className: `${CLASS$9}__input`,
16192
+ className: `${CLASS$a}__input`,
16193
16193
  type: "text",
16194
16194
  value: text,
16195
16195
  disabled,
@@ -16203,7 +16203,7 @@ const LocationField = ({
16203
16203
  "button",
16204
16204
  {
16205
16205
  type: "button",
16206
- className: `${CLASS$9}__gps`,
16206
+ className: `${CLASS$a}__gps`,
16207
16207
  onClick: useMyLocation,
16208
16208
  disabled: disabled || gps === "locating",
16209
16209
  title: labels?.useMyLocation ?? "Enviar mi ubicaci\xF3n",
@@ -16217,11 +16217,11 @@ const LocationField = ({
16217
16217
  }
16218
16218
  )
16219
16219
  ] }),
16220
- open && suggestions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$9}__suggestions`, children: suggestions.map((s) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void pickSuggestion(s.id, s.description), children: s.description }) }, s.id)) }),
16221
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__error`, children: error }),
16222
- gps === "denied" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__hint ${CLASS$9}__hint--warn`, children: labels?.permissionDenied ?? "No diste permiso de ubicaci\xF3n. Puedes escribir la direcci\xF3n." }),
16223
- gps === "unavailable" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__hint ${CLASS$9}__hint--warn`, children: labels?.unavailable ?? "No pudimos obtener tu ubicaci\xF3n. Puedes escribir la direcci\xF3n." }),
16224
- hasPoint && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$9}__confirm`, children: [
16220
+ open && suggestions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$a}__suggestions`, children: suggestions.map((s) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: () => void pickSuggestion(s.id, s.description), children: s.description }) }, s.id)) }),
16221
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__error`, children: error }),
16222
+ gps === "denied" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__hint ${CLASS$a}__hint--warn`, children: labels?.permissionDenied ?? "No diste permiso de ubicaci\xF3n. Puedes escribir la direcci\xF3n." }),
16223
+ gps === "unavailable" && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__hint ${CLASS$a}__hint--warn`, children: labels?.unavailable ?? "No pudimos obtener tu ubicaci\xF3n. Puedes escribir la direcci\xF3n." }),
16224
+ hasPoint && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$a}__confirm`, children: [
16225
16225
  /* @__PURE__ */ jsxRuntime.jsx(
16226
16226
  MapView,
16227
16227
  {
@@ -16231,7 +16231,7 @@ const LocationField = ({
16231
16231
  onPointMove: (id, lat, lng) => void movePoint(id, lat, lng)
16232
16232
  }
16233
16233
  ),
16234
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__hint`, children: labels?.confirmHint ?? "Verifica que el punto sea correcto." })
16234
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$a}__hint`, children: labels?.confirmHint ?? "Verifica que el punto sea correcto." })
16235
16235
  ] })
16236
16236
  ] });
16237
16237
  };
@@ -16854,7 +16854,7 @@ function markFitOutliers(points, radiusKm = FIT_RADIUS_KM) {
16854
16854
  return { points: marcados, outside };
16855
16855
  }
16856
16856
 
16857
- const CLASS$8 = `${COMPONENT_PREFIX$1}services-map`;
16857
+ const CLASS$9 = `${COMPONENT_PREFIX$1}services-map`;
16858
16858
  const DEFAULT_HEIGHT = 340;
16859
16859
  function readNumber(row, field) {
16860
16860
  if (!field) return void 0;
@@ -16980,7 +16980,7 @@ const ServicesMap = ({ config, eventBus, apiKey, filter, fill }) => {
16980
16980
  [livePoints]
16981
16981
  );
16982
16982
  const nadaQueDibujar = rows !== null && allPoints.length === 0 && route.length === 0;
16983
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: fill ? `${CLASS$8} ${CLASS$8}--fill` : CLASS$8, children: rows === null ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$8}__state`, children: labels.loadingText ?? "Cargando ubicaciones\u2026" }) : nadaQueDibujar ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$8}__state`, children: lineaSinMapa(labels, missing, failed) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16983
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: fill ? `${CLASS$9} ${CLASS$9}--fill` : CLASS$9, children: rows === null ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__state`, children: labels.loadingText ?? "Cargando ubicaciones\u2026" }) : nadaQueDibujar ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__state`, children: lineaSinMapa(labels, missing, failed) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16984
16984
  /* @__PURE__ */ jsxRuntime.jsx(
16985
16985
  MapView,
16986
16986
  {
@@ -16994,20 +16994,20 @@ const ServicesMap = ({ config, eventBus, apiKey, filter, fill }) => {
16994
16994
  labels: { emptyText: labels.emptyText }
16995
16995
  }
16996
16996
  ),
16997
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$8}__notes`, children: [
16998
- livePoints.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: `${CLASS$8}__note ${CLASS$8}__note--live`, children: [
16997
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$9}__notes`, children: [
16998
+ livePoints.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: `${CLASS$9}__note ${CLASS$9}__note--live`, children: [
16999
16999
  (config.live?.labels?.liveText ?? "{n} en movimiento").replace(
17000
17000
  "{n}",
17001
17001
  String(livePoints.length)
17002
17002
  ),
17003
17003
  simulated > 0 && ` \xB7 ${config.live?.labels?.simulatedText ?? "incluye posiciones simuladas"}`
17004
17004
  ] }),
17005
- missing > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$8}__note`, children: ((missing === 1 ? labels.missingTextOne : void 0) ?? labels.missingText ?? "{n} sin ubicaci\xF3n registrada").replace("{n}", String(missing)) }),
17006
- outside > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$8}__note`, children: (labels.outsideText ?? "{n} fuera de la zona (aleja el mapa para verlos)").replace(
17005
+ missing > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__note`, children: ((missing === 1 ? labels.missingTextOne : void 0) ?? labels.missingText ?? "{n} sin ubicaci\xF3n registrada").replace("{n}", String(missing)) }),
17006
+ outside > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__note`, children: (labels.outsideText ?? "{n} fuera de la zona (aleja el mapa para verlos)").replace(
17007
17007
  "{n}",
17008
17008
  String(outside)
17009
17009
  ) }),
17010
- failed && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$8}__note`, children: "No se pudieron cargar las ubicaciones." })
17010
+ failed && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$9}__note`, children: "No se pudieron cargar las ubicaciones." })
17011
17011
  ] })
17012
17012
  ] }) });
17013
17013
  };
@@ -17023,7 +17023,7 @@ function lineaSinMapa(labels, missing, failed) {
17023
17023
  return labels.emptyText ?? "Sin ubicaciones para mostrar";
17024
17024
  }
17025
17025
 
17026
- const CLASS$7 = `${COMPONENT_PREFIX$1}service-shortcuts`;
17026
+ const CLASS$8 = `${COMPONENT_PREFIX$1}service-shortcuts`;
17027
17027
  const ICONS = {
17028
17028
  // SPEC-126 — quien DESPACHA tambien necesita sus puertas, y una de ellas son las conversaciones
17029
17029
  // de sus servicios. Los cinco iconos que habia eran todos de quien PIDE una grua.
@@ -17077,16 +17077,16 @@ const ServiceShortcuts = ({
17077
17077
  }) => {
17078
17078
  if (!options?.length) return null;
17079
17079
  const elegido = !!selectedId;
17080
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: [CLASS$7, elegido ? `${CLASS$7}--used` : ""].filter(Boolean).join(" "), children: options.map((o) => {
17080
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: [CLASS$8, elegido ? `${CLASS$8}--used` : ""].filter(Boolean).join(" "), children: options.map((o) => {
17081
17081
  const esElegido = o.id === selectedId;
17082
17082
  return /* @__PURE__ */ jsxRuntime.jsxs(
17083
17083
  "button",
17084
17084
  {
17085
17085
  type: "button",
17086
17086
  className: [
17087
- `${CLASS$7}__item`,
17088
- elegido ? `${CLASS$7}__item--off` : "",
17089
- esElegido ? `${CLASS$7}__item--chosen` : ""
17087
+ `${CLASS$8}__item`,
17088
+ elegido ? `${CLASS$8}__item--off` : "",
17089
+ esElegido ? `${CLASS$8}__item--chosen` : ""
17090
17090
  ].filter(Boolean).join(" "),
17091
17091
  disabled: elegido,
17092
17092
  "aria-disabled": elegido,
@@ -17098,12 +17098,12 @@ const ServiceShortcuts = ({
17098
17098
  else if (o.route) eventBus?.emit(CHAT_EVENT.NAVIGATE, { route: o.route });
17099
17099
  },
17100
17100
  children: [
17101
- o.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__icon`, children: ICONS[o.icon] }),
17102
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$7}__text`, children: [
17103
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__label`, children: o.label }),
17104
- o.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__hint`, children: o.hint })
17101
+ o.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$8}__icon`, children: ICONS[o.icon] }),
17102
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$8}__text`, children: [
17103
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$8}__label`, children: o.label }),
17104
+ o.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$8}__hint`, children: o.hint })
17105
17105
  ] }),
17106
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__arrow`, children: esElegido ? CHECK : elegido ? null : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "9 18 15 12 9 6" }) }) })
17106
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$8}__arrow`, children: esElegido ? CHECK : elegido ? null : /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "9 18 15 12 9 6" }) }) })
17107
17107
  ]
17108
17108
  },
17109
17109
  o.id
@@ -17672,19 +17672,19 @@ function ChatNavigatorChat({ component, eventBus }) {
17672
17672
  ] });
17673
17673
  }
17674
17674
 
17675
- const CLASS$6 = `${COMPONENT_PREFIX$1}user-tools`;
17675
+ const CLASS$7 = `${COMPONENT_PREFIX$1}user-tools`;
17676
17676
  const UserTools = ({ config, onChange, onAction, className }) => {
17677
17677
  const { title, description, items } = config;
17678
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: [CLASS$6, className].filter(Boolean).join(" "), children: [
17679
- title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: `${CLASS$6}__title`, children: title }),
17680
- description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$6}__description`, children: description }),
17681
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$6}__list`, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: `${CLASS$6}__item`, children: item.kind === "action" ? (
17678
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: [CLASS$7, className].filter(Boolean).join(" "), children: [
17679
+ title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: `${CLASS$7}__title`, children: title }),
17680
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$7}__description`, children: description }),
17681
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$7}__list`, children: items.map((item) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: `${CLASS$7}__item`, children: item.kind === "action" ? (
17682
17682
  // SPEC-139 T9 — un ajuste que se pulsa: mismo renglón (etiqueta y pista), y en vez
17683
17683
  // de la caja, un botón que dice lo que hace.
17684
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$6}__action`, children: [
17685
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$6}__text`, children: [
17686
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$6}__label`, children: item.label }),
17687
- item.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$6}__hint`, children: item.hint })
17684
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$7}__action`, children: [
17685
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$7}__text`, children: [
17686
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__label`, children: item.label }),
17687
+ item.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__hint`, children: item.hint })
17688
17688
  ] }),
17689
17689
  /* @__PURE__ */ jsxRuntime.jsx(
17690
17690
  Button,
@@ -17703,13 +17703,13 @@ const UserTools = ({ config, onChange, onAction, className }) => {
17703
17703
  checked: Boolean(item.value),
17704
17704
  disabled: item.disabled,
17705
17705
  onChange: (checked) => onChange?.(item.id, checked),
17706
- label: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$6}__text`, children: [
17707
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$6}__label`, children: item.label }),
17708
- item.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$6}__hint`, children: item.hint })
17706
+ label: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$7}__text`, children: [
17707
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__label`, children: item.label }),
17708
+ item.hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$7}__hint`, children: item.hint })
17709
17709
  ] })
17710
17710
  }
17711
17711
  ) }, item.id)) }),
17712
- items.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$6}__empty`, children: "No hay herramientas disponibles por ahora." })
17712
+ items.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$7}__empty`, children: "No hay herramientas disponibles por ahora." })
17713
17713
  ] });
17714
17714
  };
17715
17715
  UserTools.displayName = "UserTools";
@@ -18319,7 +18319,7 @@ const ChatHeader = ({
18319
18319
  ] });
18320
18320
  };
18321
18321
 
18322
- const CLASS$5 = `${COMPONENT_PREFIX$1}floating-actions`;
18322
+ const CLASS$6 = `${COMPONENT_PREFIX$1}floating-actions`;
18323
18323
  const ICON_VALUES = new Set(Object.values(ICON_TYPES));
18324
18324
  function renderIcon(icon) {
18325
18325
  if (typeof icon === "string" && ICON_VALUES.has(icon)) {
@@ -18328,23 +18328,23 @@ function renderIcon(icon) {
18328
18328
  return icon;
18329
18329
  }
18330
18330
  function Side({ buttons, align, eventBus }) {
18331
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$5}__group ${CLASS$5}__group--${align}`, children: buttons.map((b) => {
18331
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$6}__group ${CLASS$6}__group--${align}`, children: buttons.map((b) => {
18332
18332
  const emit = () => {
18333
18333
  if (b.disabled) return;
18334
18334
  eventBus.emit(b.event, b.payload);
18335
18335
  };
18336
18336
  if (b.custom) {
18337
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$5}__slot`, children: [
18337
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$6}__slot`, children: [
18338
18338
  b.custom,
18339
- b.panel && b.open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$5}__panel ${CLASS$5}__panel--${align}`, children: b.panel })
18339
+ b.panel && b.open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$6}__panel ${CLASS$6}__panel--${align}`, children: b.panel })
18340
18340
  ] }, b.id);
18341
18341
  }
18342
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$5}__slot`, children: [
18342
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$6}__slot`, children: [
18343
18343
  /* @__PURE__ */ jsxRuntime.jsxs(
18344
18344
  "button",
18345
18345
  {
18346
18346
  type: "button",
18347
- className: [`${CLASS$5}__button`, b.active ? `${CLASS$5}__button--active` : ""].filter(Boolean).join(" "),
18347
+ className: [`${CLASS$6}__button`, b.active ? `${CLASS$6}__button--active` : ""].filter(Boolean).join(" "),
18348
18348
  "aria-label": b.ariaLabel,
18349
18349
  title: b.ariaLabel,
18350
18350
  "aria-pressed": b.active,
@@ -18352,16 +18352,16 @@ function Side({ buttons, align, eventBus }) {
18352
18352
  onClick: emit,
18353
18353
  children: [
18354
18354
  renderIcon(b.icon),
18355
- b.badge != null && b.badge !== "" && b.badge !== 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$5}__badge`, children: b.badge })
18355
+ b.badge != null && b.badge !== "" && b.badge !== 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$6}__badge`, children: b.badge })
18356
18356
  ]
18357
18357
  }
18358
18358
  ),
18359
- b.panel && b.open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$5}__panel ${CLASS$5}__panel--${align}`, children: b.panel })
18359
+ b.panel && b.open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$6}__panel ${CLASS$6}__panel--${align}`, children: b.panel })
18360
18360
  ] }, b.id);
18361
18361
  }) });
18362
18362
  }
18363
18363
  const ChatFloatingActions = ({ eventBus, left = [], right = [], offset = 12, glass = false }) => {
18364
- const cls = [CLASS$5, glass ? `${CLASS$5}--glass` : ""].filter(Boolean).join(" ");
18364
+ const cls = [CLASS$6, glass ? `${CLASS$6}--glass` : ""].filter(Boolean).join(" ");
18365
18365
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cls, style: { paddingLeft: offset, paddingRight: offset }, children: [
18366
18366
  /* @__PURE__ */ jsxRuntime.jsx(Side, { buttons: left, align: "left", eventBus }),
18367
18367
  /* @__PURE__ */ jsxRuntime.jsx(Side, { buttons: right, align: "right", eventBus })
@@ -18794,7 +18794,7 @@ const UserMessage = ({
18794
18794
  ] }) });
18795
18795
  };
18796
18796
 
18797
- const CLASS$4 = `${COMPONENT_PREFIX$1}photo-picker`;
18797
+ const CLASS$5 = `${COMPONENT_PREFIX$1}photo-picker`;
18798
18798
  const PhotoPicker = ({
18799
18799
  label,
18800
18800
  hint,
@@ -18819,8 +18819,8 @@ const PhotoPicker = ({
18819
18819
  void onFiles(e.target.files);
18820
18820
  e.target.value = "";
18821
18821
  };
18822
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$4}${error ? ` ${CLASS$4}--error` : ""}`, children: [
18823
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$4}__label`, children: [
18822
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$5}${error ? ` ${CLASS$5}--error` : ""}`, children: [
18823
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$5}__label`, children: [
18824
18824
  label,
18825
18825
  required ? " *" : "",
18826
18826
  hechas > 0 ? ` (${hechas}${max ? `/${max}` : ""})` : ""
@@ -18829,7 +18829,7 @@ const PhotoPicker = ({
18829
18829
  "input",
18830
18830
  {
18831
18831
  ref: galeriaRef,
18832
- className: `${CLASS$4}__native`,
18832
+ className: `${CLASS$5}__native`,
18833
18833
  type: "file",
18834
18834
  accept: "image/*",
18835
18835
  multiple: max !== 1,
@@ -18842,7 +18842,7 @@ const PhotoPicker = ({
18842
18842
  "input",
18843
18843
  {
18844
18844
  ref: camaraRef,
18845
- className: `${CLASS$4}__native`,
18845
+ className: `${CLASS$5}__native`,
18846
18846
  type: "file",
18847
18847
  accept: "image/*",
18848
18848
  capture: "environment",
@@ -18851,15 +18851,15 @@ const PhotoPicker = ({
18851
18851
  "data-testid": "photo-picker-camera"
18852
18852
  }
18853
18853
  ),
18854
- entries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$4}__grid`, children: entries.map((e, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$4}__thumb ${CLASS$4}__thumb--${e.status}`, children: [
18855
- e.previewUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: `${CLASS$4}__img`, src: e.previewUrl, alt: e.name }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$4}__placeholder`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: ICON_TYPES.IMAGE }) }),
18856
- e.status === "uploading" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$4}__state`, children: "Subiendo\u2026" }),
18857
- e.status === "error" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$4}__state ${CLASS$4}__state--error`, children: "No se pudo subir" }),
18854
+ entries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$5}__grid`, children: entries.map((e, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$5}__thumb ${CLASS$5}__thumb--${e.status}`, children: [
18855
+ e.previewUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: `${CLASS$5}__img`, src: e.previewUrl, alt: e.name }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$5}__placeholder`, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: ICON_TYPES.IMAGE }) }),
18856
+ e.status === "uploading" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$5}__state`, children: "Subiendo\u2026" }),
18857
+ e.status === "error" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$5}__state ${CLASS$5}__state--error`, children: "No se pudo subir" }),
18858
18858
  onRemove && e.status !== "uploading" && /* @__PURE__ */ jsxRuntime.jsx(
18859
18859
  "button",
18860
18860
  {
18861
18861
  type: "button",
18862
- className: `${CLASS$4}__remove`,
18862
+ className: `${CLASS$5}__remove`,
18863
18863
  onClick: () => onRemove(i),
18864
18864
  "aria-label": `Quitar ${e.name}`,
18865
18865
  disabled,
@@ -18867,12 +18867,12 @@ const PhotoPicker = ({
18867
18867
  }
18868
18868
  )
18869
18869
  ] }, `${e.name}-${i}`)) }),
18870
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$4}__actions`, children: [
18870
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$5}__actions`, children: [
18871
18871
  capture && /* @__PURE__ */ jsxRuntime.jsxs(
18872
18872
  "button",
18873
18873
  {
18874
18874
  type: "button",
18875
- className: `${CLASS$4}__pick`,
18875
+ className: `${CLASS$5}__pick`,
18876
18876
  onClick: () => elegir(camaraRef),
18877
18877
  disabled: disabled || lleno,
18878
18878
  children: [
@@ -18885,7 +18885,7 @@ const PhotoPicker = ({
18885
18885
  "button",
18886
18886
  {
18887
18887
  type: "button",
18888
- className: `${CLASS$4}__pick ${CLASS$4}__pick--secondary`,
18888
+ className: `${CLASS$5}__pick ${CLASS$5}__pick--secondary`,
18889
18889
  onClick: () => elegir(galeriaRef),
18890
18890
  disabled: disabled || lleno,
18891
18891
  children: [
@@ -18895,13 +18895,13 @@ const PhotoPicker = ({
18895
18895
  }
18896
18896
  )
18897
18897
  ] }),
18898
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$4}__error`, children: error }),
18899
- !error && subiendo && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$4}__hint`, children: "Espera a que terminen de subir." }),
18900
- !error && !subiendo && hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$4}__hint`, children: hint })
18898
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$5}__error`, children: error }),
18899
+ !error && subiendo && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$5}__hint`, children: "Espera a que terminen de subir." }),
18900
+ !error && !subiendo && hint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$5}__hint`, children: hint })
18901
18901
  ] });
18902
18902
  };
18903
18903
 
18904
- const CLASS$3 = `${COMPONENT_PREFIX$1}credentials-card`;
18904
+ const CLASS$4 = `${COMPONENT_PREFIX$1}credentials-card`;
18905
18905
  async function copiar(texto) {
18906
18906
  try {
18907
18907
  await navigator.clipboard.writeText(texto);
@@ -18918,15 +18918,15 @@ const Fila = ({ row }) => {
18918
18918
  const t = setTimeout(() => setCopiado(false), 1800);
18919
18919
  return () => clearTimeout(t);
18920
18920
  }, [copiado]);
18921
- return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$3}__row`, children: [
18922
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$3}__label`, children: row.label }),
18923
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$3}__value`, "data-testid": `credential-${row.label}`, children: visible ? row.value : "\u2022".repeat(Math.min(row.value.length, 12)) }),
18924
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$3}__tools`, children: [
18921
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: `${CLASS$4}__row`, children: [
18922
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$4}__label`, children: row.label }),
18923
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${CLASS$4}__value`, "data-testid": `credential-${row.label}`, children: visible ? row.value : "\u2022".repeat(Math.min(row.value.length, 12)) }),
18924
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${CLASS$4}__tools`, children: [
18925
18925
  row.masked && /* @__PURE__ */ jsxRuntime.jsx(
18926
18926
  "button",
18927
18927
  {
18928
18928
  type: "button",
18929
- className: `${CLASS$3}__tool`,
18929
+ className: `${CLASS$4}__tool`,
18930
18930
  onClick: () => setVisible((v) => !v),
18931
18931
  "aria-label": visible ? `Ocultar ${row.label}` : `Ver ${row.label}`,
18932
18932
  children: visible ? "Ocultar" : "Ver"
@@ -18936,7 +18936,7 @@ const Fila = ({ row }) => {
18936
18936
  "button",
18937
18937
  {
18938
18938
  type: "button",
18939
- className: `${CLASS$3}__tool`,
18939
+ className: `${CLASS$4}__tool`,
18940
18940
  onClick: async () => setCopiado(await copiar(row.value)),
18941
18941
  "aria-label": `Copiar ${row.label}`,
18942
18942
  children: copiado ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -18955,15 +18955,256 @@ const CredentialsCard = ({
18955
18955
  note,
18956
18956
  action,
18957
18957
  className
18958
- }) => /* @__PURE__ */ jsxRuntime.jsxs("section", { className: [CLASS$3, className].filter(Boolean).join(" "), "aria-label": title, children: [
18959
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: `${CLASS$3}__title`, children: title }),
18960
- intro && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$3}__intro`, children: intro }),
18961
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$3}__rows`, children: rows.map((r) => /* @__PURE__ */ jsxRuntime.jsx(Fila, { row: r }, r.label)) }),
18962
- note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$3}__note`, children: note }),
18963
- action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$3}__action`, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { fullWidth: true, onClick: action.onClick, disabled: action.disabled, children: action.label }) })
18958
+ }) => /* @__PURE__ */ jsxRuntime.jsxs("section", { className: [CLASS$4, className].filter(Boolean).join(" "), "aria-label": title, children: [
18959
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: `${CLASS$4}__title`, children: title }),
18960
+ intro && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$4}__intro`, children: intro }),
18961
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: `${CLASS$4}__rows`, children: rows.map((r) => /* @__PURE__ */ jsxRuntime.jsx(Fila, { row: r }, r.label)) }),
18962
+ note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$4}__note`, children: note }),
18963
+ action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$4}__action`, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { fullWidth: true, onClick: action.onClick, disabled: action.disabled, children: action.label }) })
18964
18964
  ] });
18965
18965
  CredentialsCard.displayName = "CredentialsCard";
18966
18966
 
18967
+ const TextArea = React.forwardRef(
18968
+ ({
18969
+ label,
18970
+ error,
18971
+ status,
18972
+ variant = "outlined",
18973
+ fullWidth = false,
18974
+ size = "middle",
18975
+ allowClear = false,
18976
+ onClear,
18977
+ minRows = 3,
18978
+ maxRows,
18979
+ resize = "vertical",
18980
+ showCount = false,
18981
+ maxLength,
18982
+ footer,
18983
+ className = "",
18984
+ value,
18985
+ onChange,
18986
+ disabled,
18987
+ ...props
18988
+ }, ref) => {
18989
+ const [internalValue, setInternalValue] = React.useState("");
18990
+ const textareaRef = React.useRef(null);
18991
+ React.useEffect(() => {
18992
+ if (value !== void 0) {
18993
+ setInternalValue(String(value));
18994
+ }
18995
+ }, [value]);
18996
+ const adjustHeight = React.useCallback(() => {
18997
+ const textarea = textareaRef.current;
18998
+ if (!textarea || resize === "none") return;
18999
+ textarea.style.height = "auto";
19000
+ const lineHeight = parseInt(getComputedStyle(textarea).lineHeight) || 20;
19001
+ const paddingY = 16;
19002
+ const minHeight = minRows * lineHeight + paddingY;
19003
+ const maxHeight = maxRows ? maxRows * lineHeight + paddingY : Infinity;
19004
+ const newHeight = Math.min(
19005
+ Math.max(textarea.scrollHeight, minHeight),
19006
+ maxHeight
19007
+ );
19008
+ textarea.style.height = `${newHeight}px`;
19009
+ }, [minRows, maxRows, resize]);
19010
+ React.useEffect(() => {
19011
+ if (resize !== "none") {
19012
+ adjustHeight();
19013
+ }
19014
+ }, [internalValue, adjustHeight, resize]);
19015
+ const handleChange = React.useCallback(
19016
+ (e) => {
19017
+ const newValue = e.target.value;
19018
+ if (maxLength && newValue.length > maxLength) {
19019
+ return;
19020
+ }
19021
+ setInternalValue(newValue);
19022
+ onChange?.(e);
19023
+ },
19024
+ [onChange, maxLength]
19025
+ );
19026
+ const handleClear = React.useCallback(() => {
19027
+ setInternalValue("");
19028
+ onClear?.();
19029
+ if (onChange && textareaRef.current) {
19030
+ const syntheticEvent = {
19031
+ target: { value: "" },
19032
+ currentTarget: { value: "" }
19033
+ };
19034
+ onChange(syntheticEvent);
19035
+ }
19036
+ textareaRef.current?.focus();
19037
+ }, [onChange, onClear]);
19038
+ const showClearIcon = Boolean(allowClear && internalValue && !disabled);
19039
+ const characterCount = internalValue.length;
19040
+ const wrapperClasses = [
19041
+ `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper`,
19042
+ `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${variant}`,
19043
+ `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${size}`,
19044
+ error && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--error`,
19045
+ status && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${status}`,
19046
+ fullWidth && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--full-width`
19047
+ ].filter(Boolean).join(" ");
19048
+ const textareaClasses = [
19049
+ `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}`,
19050
+ `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}--resize-${resize}`,
19051
+ showClearIcon && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}--with-clear`,
19052
+ className
19053
+ ].filter(Boolean).join(" ");
19054
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: wrapperClasses, children: [
19055
+ label && /* @__PURE__ */ jsxRuntime.jsx(
19056
+ "label",
19057
+ {
19058
+ className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__label`,
19059
+ children: label
19060
+ }
19061
+ ),
19062
+ /* @__PURE__ */ jsxRuntime.jsxs(
19063
+ "div",
19064
+ {
19065
+ className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__container`,
19066
+ children: [
19067
+ /* @__PURE__ */ jsxRuntime.jsx(
19068
+ "textarea",
19069
+ {
19070
+ ref: (node) => {
19071
+ textareaRef.current = node;
19072
+ if (typeof ref === "function") {
19073
+ ref(node);
19074
+ } else if (ref) {
19075
+ ref.current = node;
19076
+ }
19077
+ },
19078
+ className: textareaClasses,
19079
+ value: internalValue,
19080
+ onChange: handleChange,
19081
+ disabled,
19082
+ rows: minRows,
19083
+ maxLength,
19084
+ ...props
19085
+ }
19086
+ ),
19087
+ showClearIcon && /* @__PURE__ */ jsxRuntime.jsx(
19088
+ Button,
19089
+ {
19090
+ variant: "ghost",
19091
+ size: "small",
19092
+ className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__clear`,
19093
+ onClick: handleClear,
19094
+ "aria-label": "Clear textarea",
19095
+ icon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: LUMI_ICON_TYPES.CLOSE, size: "small" })
19096
+ }
19097
+ )
19098
+ ]
19099
+ }
19100
+ ),
19101
+ /* @__PURE__ */ jsxRuntime.jsxs(
19102
+ "div",
19103
+ {
19104
+ className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__footer`,
19105
+ children: [
19106
+ error && /* @__PURE__ */ jsxRuntime.jsx(
19107
+ "span",
19108
+ {
19109
+ className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__error`,
19110
+ children: error
19111
+ }
19112
+ ),
19113
+ footer && /* @__PURE__ */ jsxRuntime.jsx(
19114
+ "div",
19115
+ {
19116
+ className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__custom-footer`,
19117
+ children: footer
19118
+ }
19119
+ ),
19120
+ showCount && /* @__PURE__ */ jsxRuntime.jsx(
19121
+ "span",
19122
+ {
19123
+ className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__count`,
19124
+ children: maxLength ? `${characterCount}/${maxLength}` : characterCount
19125
+ }
19126
+ )
19127
+ ]
19128
+ }
19129
+ )
19130
+ ] });
19131
+ }
19132
+ );
19133
+ TextArea.displayName = "TextArea";
19134
+
19135
+ const CLASS$3 = `${COMPONENT_PREFIX$1}support-request-form`;
19136
+ const VACIO = { name: "", email: "", phone: "", subject: "", message: "" };
19137
+ function faltantes(v) {
19138
+ if (v.name.trim().length < 2) return "Escribe tu nombre.";
19139
+ if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(v.email.trim())) return "Escribe un correo v\xE1lido.";
19140
+ if (v.subject.trim().length < 3) return "Escribe de qu\xE9 se trata.";
19141
+ if (v.message.trim().length < 10) return "Cu\xE9ntanos un poco m\xE1s (al menos 10 caracteres).";
19142
+ return null;
19143
+ }
19144
+ const SupportRequestForm = ({
19145
+ title = "D\xE9janos tu solicitud",
19146
+ intro,
19147
+ note = "Te respondemos al correo que dejes.",
19148
+ initial,
19149
+ onSubmit,
19150
+ sent = false,
19151
+ sentLabel = "Solicitud enviada",
19152
+ submitLabel = "Enviar",
19153
+ className
19154
+ }) => {
19155
+ const [values, setValues] = React.useState({ ...VACIO, ...initial });
19156
+ const [error, setError] = React.useState(null);
19157
+ const [enviando, setEnviando] = React.useState(false);
19158
+ const set = (campo) => (e) => setValues((v) => ({ ...v, [campo]: e.target.value }));
19159
+ const enviar = async (e) => {
19160
+ e.preventDefault();
19161
+ if (sent || enviando) return;
19162
+ const falta = faltantes(values);
19163
+ if (falta) {
19164
+ setError(falta);
19165
+ return;
19166
+ }
19167
+ setError(null);
19168
+ setEnviando(true);
19169
+ try {
19170
+ await onSubmit({ ...values, name: values.name.trim(), email: values.email.trim(), phone: values.phone.trim(), subject: values.subject.trim(), message: values.message.trim() });
19171
+ } catch (err) {
19172
+ setError(err instanceof Error && err.message ? err.message : "No se pudo enviar. Int\xE9ntalo de nuevo.");
19173
+ } finally {
19174
+ setEnviando(false);
19175
+ }
19176
+ };
19177
+ return /* @__PURE__ */ jsxRuntime.jsxs(
19178
+ "form",
19179
+ {
19180
+ className: [CLASS$3, sent ? `${CLASS$3}--sent` : "", className].filter(Boolean).join(" "),
19181
+ onSubmit: enviar,
19182
+ noValidate: true,
19183
+ children: [
19184
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: `${CLASS$3}__title`, children: title }),
19185
+ intro && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$3}__intro`, children: intro }),
19186
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$3}__fields`, children: [
19187
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${CLASS$3}__row`, children: [
19188
+ /* @__PURE__ */ jsxRuntime.jsx(Input$1, { label: "Nombre", value: values.name, onChange: set("name"), fullWidth: true, disabled: sent, autoComplete: "name" }),
19189
+ /* @__PURE__ */ jsxRuntime.jsx(Input$1, { label: "Tel\xE9fono (opcional)", value: values.phone, onChange: set("phone"), fullWidth: true, disabled: sent, inputMode: "tel", autoComplete: "tel" })
19190
+ ] }),
19191
+ /* @__PURE__ */ jsxRuntime.jsx(Input$1, { label: "Correo", type: "email", value: values.email, onChange: set("email"), fullWidth: true, disabled: sent, inputMode: "email", autoComplete: "email" }),
19192
+ /* @__PURE__ */ jsxRuntime.jsx(Input$1, { label: "Asunto", value: values.subject, onChange: set("subject"), fullWidth: true, disabled: sent }),
19193
+ /* @__PURE__ */ jsxRuntime.jsx(TextArea, { label: "Mensaje", value: values.message, onChange: set("message"), fullWidth: true, disabled: sent, minRows: 3, maxLength: 4e3, showCount: true })
19194
+ ] }),
19195
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$3}__error`, role: "alert", children: error }),
19196
+ sent ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: `${CLASS$3}__done`, role: "status", children: [
19197
+ /* @__PURE__ */ jsxRuntime.jsx(Icon$1, { type: ICON_TYPES.CHECK, size: "small" }),
19198
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: sentLabel })
19199
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
19200
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${CLASS$3}__actions`, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", variant: "primary", isLoading: enviando, disabled: enviando, children: submitLabel }) }),
19201
+ note && /* @__PURE__ */ jsxRuntime.jsx("p", { className: `${CLASS$3}__note`, children: note })
19202
+ ] })
19203
+ ]
19204
+ }
19205
+ );
19206
+ };
19207
+
18967
19208
  const FADE_AFTER_MS = 4e3;
18968
19209
  const NewMessageDivider = ({
18969
19210
  label = "Nuevo mensaje",
@@ -20910,174 +21151,6 @@ const Loader = React.forwardRef(
20910
21151
  );
20911
21152
  Loader.displayName = "LumiLoader";
20912
21153
 
20913
- const TextArea = React.forwardRef(
20914
- ({
20915
- label,
20916
- error,
20917
- status,
20918
- variant = "outlined",
20919
- fullWidth = false,
20920
- size = "middle",
20921
- allowClear = false,
20922
- onClear,
20923
- minRows = 3,
20924
- maxRows,
20925
- resize = "vertical",
20926
- showCount = false,
20927
- maxLength,
20928
- footer,
20929
- className = "",
20930
- value,
20931
- onChange,
20932
- disabled,
20933
- ...props
20934
- }, ref) => {
20935
- const [internalValue, setInternalValue] = React.useState("");
20936
- const textareaRef = React.useRef(null);
20937
- React.useEffect(() => {
20938
- if (value !== void 0) {
20939
- setInternalValue(String(value));
20940
- }
20941
- }, [value]);
20942
- const adjustHeight = React.useCallback(() => {
20943
- const textarea = textareaRef.current;
20944
- if (!textarea || resize === "none") return;
20945
- textarea.style.height = "auto";
20946
- const lineHeight = parseInt(getComputedStyle(textarea).lineHeight) || 20;
20947
- const paddingY = 16;
20948
- const minHeight = minRows * lineHeight + paddingY;
20949
- const maxHeight = maxRows ? maxRows * lineHeight + paddingY : Infinity;
20950
- const newHeight = Math.min(
20951
- Math.max(textarea.scrollHeight, minHeight),
20952
- maxHeight
20953
- );
20954
- textarea.style.height = `${newHeight}px`;
20955
- }, [minRows, maxRows, resize]);
20956
- React.useEffect(() => {
20957
- if (resize !== "none") {
20958
- adjustHeight();
20959
- }
20960
- }, [internalValue, adjustHeight, resize]);
20961
- const handleChange = React.useCallback(
20962
- (e) => {
20963
- const newValue = e.target.value;
20964
- if (maxLength && newValue.length > maxLength) {
20965
- return;
20966
- }
20967
- setInternalValue(newValue);
20968
- onChange?.(e);
20969
- },
20970
- [onChange, maxLength]
20971
- );
20972
- const handleClear = React.useCallback(() => {
20973
- setInternalValue("");
20974
- onClear?.();
20975
- if (onChange && textareaRef.current) {
20976
- const syntheticEvent = {
20977
- target: { value: "" },
20978
- currentTarget: { value: "" }
20979
- };
20980
- onChange(syntheticEvent);
20981
- }
20982
- textareaRef.current?.focus();
20983
- }, [onChange, onClear]);
20984
- const showClearIcon = Boolean(allowClear && internalValue && !disabled);
20985
- const characterCount = internalValue.length;
20986
- const wrapperClasses = [
20987
- `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper`,
20988
- `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${variant}`,
20989
- `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${size}`,
20990
- error && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--error`,
20991
- status && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--${status}`,
20992
- fullWidth && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper--full-width`
20993
- ].filter(Boolean).join(" ");
20994
- const textareaClasses = [
20995
- `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}`,
20996
- `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}--resize-${resize}`,
20997
- showClearIcon && `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}--with-clear`,
20998
- className
20999
- ].filter(Boolean).join(" ");
21000
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: wrapperClasses, children: [
21001
- label && /* @__PURE__ */ jsxRuntime.jsx(
21002
- "label",
21003
- {
21004
- className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__label`,
21005
- children: label
21006
- }
21007
- ),
21008
- /* @__PURE__ */ jsxRuntime.jsxs(
21009
- "div",
21010
- {
21011
- className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__container`,
21012
- children: [
21013
- /* @__PURE__ */ jsxRuntime.jsx(
21014
- "textarea",
21015
- {
21016
- ref: (node) => {
21017
- textareaRef.current = node;
21018
- if (typeof ref === "function") {
21019
- ref(node);
21020
- } else if (ref) {
21021
- ref.current = node;
21022
- }
21023
- },
21024
- className: textareaClasses,
21025
- value: internalValue,
21026
- onChange: handleChange,
21027
- disabled,
21028
- rows: minRows,
21029
- maxLength,
21030
- ...props
21031
- }
21032
- ),
21033
- showClearIcon && /* @__PURE__ */ jsxRuntime.jsx(
21034
- Button,
21035
- {
21036
- variant: "ghost",
21037
- size: "small",
21038
- className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__clear`,
21039
- onClick: handleClear,
21040
- "aria-label": "Clear textarea",
21041
- icon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: LUMI_ICON_TYPES.CLOSE, size: "small" })
21042
- }
21043
- )
21044
- ]
21045
- }
21046
- ),
21047
- /* @__PURE__ */ jsxRuntime.jsxs(
21048
- "div",
21049
- {
21050
- className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__footer`,
21051
- children: [
21052
- error && /* @__PURE__ */ jsxRuntime.jsx(
21053
- "span",
21054
- {
21055
- className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__error`,
21056
- children: error
21057
- }
21058
- ),
21059
- footer && /* @__PURE__ */ jsxRuntime.jsx(
21060
- "div",
21061
- {
21062
- className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__custom-footer`,
21063
- children: footer
21064
- }
21065
- ),
21066
- showCount && /* @__PURE__ */ jsxRuntime.jsx(
21067
- "span",
21068
- {
21069
- className: `${COMPONENT_PREFIX}${COMPONENT_TYPES.TEXTAREA}-wrapper__count`,
21070
- children: maxLength ? `${characterCount}/${maxLength}` : characterCount
21071
- }
21072
- )
21073
- ]
21074
- }
21075
- )
21076
- ] });
21077
- }
21078
- );
21079
- TextArea.displayName = "TextArea";
21080
-
21081
21154
  const MenuContext = React.createContext(void 0);
21082
21155
  const MenuProvider = MenuContext.Provider;
21083
21156
  const useMenuContext = () => {
@@ -25417,6 +25490,7 @@ exports.ReactiveCrud = ReactiveCrud;
25417
25490
  exports.ServiceShortcuts = ServiceShortcuts;
25418
25491
  exports.ServicesMap = ServicesMap;
25419
25492
  exports.SessionExpiryPrompt = SessionExpiryPrompt;
25493
+ exports.SupportRequestForm = SupportRequestForm;
25420
25494
  exports.UserTools = UserTools;
25421
25495
  exports.chatEventBus = chatEventBus;
25422
25496
  exports.clearChatComponents = clearChatComponents;