@sfperusacdev/sf-ui 0.1.11 → 0.1.13

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.
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { CSSProperties, ReactNode } from 'react';
2
2
  export type ModalSize = "sm" | "md" | "lg" | "xl";
3
3
  export type OverlayHeaderVariant = "default" | "brand" | "dark" | "danger";
4
4
  export type ModalProps = {
@@ -11,13 +11,20 @@ export type ModalProps = {
11
11
  footer?: ReactNode;
12
12
  subheader?: ReactNode;
13
13
  size?: ModalSize;
14
+ /**
15
+ * Ancho máximo libre (ej. 640, "40rem", "90vw"). Tiene prioridad sobre `size`.
16
+ * Se aplica por estilo inline, así que no depende del orden de carga del CSS.
17
+ */
18
+ maxWidth?: CSSProperties["maxWidth"];
19
+ /** Ancho fijo. Por defecto el modal ocupa el 100% disponible hasta su máximo. */
20
+ width?: CSSProperties["width"];
14
21
  headerVariant?: OverlayHeaderVariant;
15
22
  /** Oculta cabecera estándar (título, subtítulo, icono y cerrar) cuando el consumidor renderiza cabecera propia en el body. */
16
23
  hideHeader?: boolean;
17
24
  closeOnOverlay?: boolean;
18
25
  className?: string;
19
26
  };
20
- export declare const Modal: ({ open, onClose, title, subtitle, icon, children, footer, subheader, size, headerVariant, hideHeader, closeOnOverlay, className, }: ModalProps) => import('react').ReactPortal | null;
27
+ export declare const Modal: ({ open, onClose, title, subtitle, icon, children, footer, subheader, size, maxWidth, width, headerVariant, hideHeader, closeOnOverlay, className, }: ModalProps) => import('react').ReactPortal | null;
21
28
  type UseModalOptions = {
22
29
  onOpen?: () => void;
23
30
  onClose?: () => void;
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@sfperusacdev/sf-ui",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "SF UI — librería de componentes React (inputs, tablas, hooks) para aplicaciones SF Perú.",
5
5
  "type": "module",
6
6
  "main": "./dist/sf-ui.umd.cjs",
7
7
  "module": "./dist/sf-ui.js",
8
- "types": "./dist/types/index.d.ts",
8
+ "types": "./dist/types/src/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
11
  "import": {
12
- "types": "./dist/types/index.d.ts",
12
+ "types": "./dist/types/src/index.d.ts",
13
13
  "default": "./dist/sf-ui.js"
14
14
  },
15
15
  "require": {
16
- "types": "./dist/types/index.d.ts",
16
+ "types": "./dist/types/src/index.d.ts",
17
17
  "default": "./dist/sf-ui.umd.cjs"
18
18
  }
19
19
  },