@onpe/ui 1.1.4 → 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 +7 -0
- package/dist/cli.js +7 -0
- package/package.json +1 -1
package/dist/cli.esm.js
CHANGED
|
@@ -6387,6 +6387,13 @@ 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, "\""); });
|
package/dist/cli.js
CHANGED
|
@@ -6387,6 +6387,13 @@ 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, "\""); });
|