sass-cms-template-common 0.0.11 → 0.0.12

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.ts CHANGED
@@ -919,7 +919,11 @@ export declare type CmsConfirmDialogProps = {
919
919
  minHeight?: number | string;
920
920
  /** Evita cerrar al hacer clic fuera o con Escape (p. ej. mientras carga). */
921
921
  disableBackdropClose?: boolean;
922
- /** Base para los `data-testid`. */
922
+ /**
923
+ * Base para los `data-testid`. Emite: `${testId}` (modal),
924
+ * `${testId}-icon-btn-close` (botón X), `${testId}-actions` (fila de botones)
925
+ * y los botones `${testId}-actions-btn-cancel` y `${testId}-actions-btn-confirm`.
926
+ */
923
927
  testId?: string;
924
928
  };
925
929
 
@@ -1052,7 +1056,11 @@ export declare type CmsDialogActionsProps = {
1052
1056
  fullWidth?: boolean;
1053
1057
  /** Alineación horizontal de los botones. Por defecto `end`. */
1054
1058
  align?: CmsDialogActionsAlign;
1055
- /** Base para los `data-testid`. */
1059
+ /**
1060
+ * Base para los `data-testid`. El contenedor usa `testId`; el botón cancelar
1061
+ * emite `${testId}-btn-cancel` y el de confirmar `${testId}-btn-confirm`
1062
+ * (cada uno con su `data-action` `cancel` / `confirm` como atributo extra).
1063
+ */
1056
1064
  testId?: string;
1057
1065
  };
1058
1066
 
@@ -6937,6 +6945,28 @@ export declare type TopBarProps = {
6937
6945
  */
6938
6946
  export declare function toSiteWallClock(epochMs: number, gmtRedaction: string | null | undefined): number;
6939
6947
 
6948
+ /**
6949
+ * Normaliza un valor a un `data-testid` estable en kebab-case ASCII.
6950
+ *
6951
+ * Equivalente React del pipe `toTestId` del CMS Angular (`cmsmedios-ux`):
6952
+ * pasa a minúsculas, quita tildes/acentos y convierte cualquier separador
6953
+ * (espacios, puntos, guiones bajos, barras) en un único guion.
6954
+ *
6955
+ * IMPORTANTE: el valor que se le pasa debe ser **independiente del idioma**
6956
+ * (una clave i18n, un `id`/`value`/`slug`, un código o enum interno), nunca el
6957
+ * texto traducido: si no, el `data-testid` cambiaría según el idioma del usuario
6958
+ * y las pruebas no podrían apuntarlo de forma estable.
6959
+ *
6960
+ * @param value Valor de origen (clave i18n, id, código o índice).
6961
+ * @returns El `data-testid` normalizado, o `''` si el valor es vacío/nulo.
6962
+ *
6963
+ * @example
6964
+ * toTestId('modal.deactivate.title') // 'modal-deactivate-title'
6965
+ * toTestId('Próximo evento') // 'proximo-evento'
6966
+ * toTestId(3) // '3'
6967
+ */
6968
+ export declare function toTestId(value: string | number | null | undefined): string;
6969
+
6940
6970
  /**
6941
6971
  * Cuerpo de la respuesta de POST /transcribe/get.
6942
6972
  *