@onpe/ui 1.1.3 → 1.1.5

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/cli.esm.js CHANGED
@@ -6387,12 +6387,21 @@ function personalizeComponent(code, componentName) {
6387
6387
  personalizedCode = personalizedCode.replace(/from "\.\.\/onpe\/ui\/(Portal|Overlay)"/g, function (match, component) { return "from \"./".concat(component, "\""); });
6388
6388
  personalizedCode = personalizedCode.replace(/from "\.\.\/onpe\/icons\/actions\/(IconClose)"/g, function (match, component) { return "from \"../icons/actions/".concat(component, "\""); });
6389
6389
  }
6390
+ // Para iconos que necesitan SVGProps
6391
+ if (componentName.toLowerCase().startsWith("icon-")) {
6392
+ // Agregar importación de SVGProps si no existe
6393
+ if (personalizedCode.includes("SVGProps<SVGSVGElement>") && !personalizedCode.includes("import { SVGProps }")) {
6394
+ personalizedCode = personalizedCode.replace(/import React from "react";/, "import React, { SVGProps } from \"react\";");
6395
+ }
6396
+ }
6390
6397
  // Para otros componentes UI
6391
6398
  if (!componentName.toLowerCase().startsWith("icon-") && !componentName.toLowerCase().startsWith("modal")) {
6392
6399
  personalizedCode = personalizedCode.replace(/from "\.\.\/onpe\/ui\/([^"]+)"/g, function (match, component) { return "from \"./".concat(component, "\""); });
6393
6400
  }
6394
6401
  // Para modales que importan componentes UI
6395
6402
  if (componentName.toLowerCase().startsWith("modal") && componentName !== "modal") {
6403
+ // Arreglar importación de Modal específicamente
6404
+ personalizedCode = personalizedCode.replace(/from "\.\.\/\.\.\/Modal\/Modal"/g, "from \"../ui/Modal\"");
6396
6405
  personalizedCode = personalizedCode.replace(/from "\.\.\/onpe\/ui\/([^"]+)"/g, function (match, component) { return "from \"../ui/".concat(component, "\""); });
6397
6406
  // Arreglar importaciones de iconos en modales
6398
6407
  personalizedCode = personalizedCode.replace(/from "\.\.\/onpe\/icons\/([^"]+)"/g, function (match, path) { return "from \"../icons/".concat(path, "\""); });
package/dist/cli.js CHANGED
@@ -6387,12 +6387,21 @@ function personalizeComponent(code, componentName) {
6387
6387
  personalizedCode = personalizedCode.replace(/from "\.\.\/onpe\/ui\/(Portal|Overlay)"/g, function (match, component) { return "from \"./".concat(component, "\""); });
6388
6388
  personalizedCode = personalizedCode.replace(/from "\.\.\/onpe\/icons\/actions\/(IconClose)"/g, function (match, component) { return "from \"../icons/actions/".concat(component, "\""); });
6389
6389
  }
6390
+ // Para iconos que necesitan SVGProps
6391
+ if (componentName.toLowerCase().startsWith("icon-")) {
6392
+ // Agregar importación de SVGProps si no existe
6393
+ if (personalizedCode.includes("SVGProps<SVGSVGElement>") && !personalizedCode.includes("import { SVGProps }")) {
6394
+ personalizedCode = personalizedCode.replace(/import React from "react";/, "import React, { SVGProps } from \"react\";");
6395
+ }
6396
+ }
6390
6397
  // Para otros componentes UI
6391
6398
  if (!componentName.toLowerCase().startsWith("icon-") && !componentName.toLowerCase().startsWith("modal")) {
6392
6399
  personalizedCode = personalizedCode.replace(/from "\.\.\/onpe\/ui\/([^"]+)"/g, function (match, component) { return "from \"./".concat(component, "\""); });
6393
6400
  }
6394
6401
  // Para modales que importan componentes UI
6395
6402
  if (componentName.toLowerCase().startsWith("modal") && componentName !== "modal") {
6403
+ // Arreglar importación de Modal específicamente
6404
+ personalizedCode = personalizedCode.replace(/from "\.\.\/\.\.\/Modal\/Modal"/g, "from \"../ui/Modal\"");
6396
6405
  personalizedCode = personalizedCode.replace(/from "\.\.\/onpe\/ui\/([^"]+)"/g, function (match, component) { return "from \"../ui/".concat(component, "\""); });
6397
6406
  // Arreglar importaciones de iconos en modales
6398
6407
  personalizedCode = personalizedCode.replace(/from "\.\.\/onpe\/icons\/([^"]+)"/g, function (match, path) { return "from \"../icons/".concat(path, "\""); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onpe/ui",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "type": "module",
5
5
  "description": "Librería completa de UI para ONPE - Componentes, Hooks, Utils y Librerías",
6
6
  "main": "dist/index.js",