@crowdfarming/oliva-ds 1.44.0 → 1.44.1
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.
|
@@ -2362,12 +2362,13 @@ class IconComponent {
|
|
|
2362
2362
|
return;
|
|
2363
2363
|
}
|
|
2364
2364
|
let svgString = this.icons[this.iconName];
|
|
2365
|
-
// Set responsive dimensions -
|
|
2366
|
-
//
|
|
2365
|
+
// Set responsive dimensions - height to 100% for flexible scaling
|
|
2366
|
+
// Width is handled by CSS (width: auto) to maintain natural aspect ratio
|
|
2367
2367
|
// First, remove any existing width and height attributes
|
|
2368
2368
|
svgString = svgString.replace(/(width|height)="[^"]*"/g, '');
|
|
2369
|
-
// Then add
|
|
2370
|
-
|
|
2369
|
+
// Then add height="100%" and preserveAspectRatio to the SVG element
|
|
2370
|
+
// Width is controlled by CSS to allow flexible sizing
|
|
2371
|
+
svgString = svgString.replace(/<svg([^>]*)>/, '<svg$1 height="100%" preserveAspectRatio="xMidYMid meet">');
|
|
2371
2372
|
// Apply dynamic color styling if a color is specified
|
|
2372
2373
|
if (this.iconColor) {
|
|
2373
2374
|
// Create a CSS variable reference for the color
|
|
@@ -2387,11 +2388,11 @@ class IconComponent {
|
|
|
2387
2388
|
this.iconSvg = this.sanitizer.bypassSecurityTrustHtml(svgString);
|
|
2388
2389
|
}
|
|
2389
2390
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: IconComponent, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
2390
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: IconComponent, isStandalone: true, selector: "lib-icon", inputs: { size: "size", icon: "icon", name: "name", color: "color" }, ngImport: i0, template: "<div\n class=\"lib-icon\"\n [ngClass]=\"size\"\n [innerHTML]=\"iconSvg\"\n></div>\n", styles: [":host{display:contents}.lib-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.lib-icon svg{width:
|
|
2391
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: IconComponent, isStandalone: true, selector: "lib-icon", inputs: { size: "size", icon: "icon", name: "name", color: "color" }, ngImport: i0, template: "<div\n class=\"lib-icon\"\n [ngClass]=\"size\"\n [innerHTML]=\"iconSvg\"\n></div>\n", styles: [":host{display:contents}.lib-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.lib-icon svg{width:auto;max-width:100%;min-width:0;min-height:0;display:block}.lib-icon.lg{height:1.5rem}.lib-icon.md{height:1.25rem}.lib-icon.sm{height:1rem}.lib-icon.xs{height:.875rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
2391
2392
|
}
|
|
2392
2393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: IconComponent, decorators: [{
|
|
2393
2394
|
type: Component,
|
|
2394
|
-
args: [{ selector: 'lib-icon', imports: [CommonModule], template: "<div\n class=\"lib-icon\"\n [ngClass]=\"size\"\n [innerHTML]=\"iconSvg\"\n></div>\n", styles: [":host{display:contents}.lib-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.lib-icon svg{width:
|
|
2395
|
+
args: [{ selector: 'lib-icon', imports: [CommonModule], template: "<div\n class=\"lib-icon\"\n [ngClass]=\"size\"\n [innerHTML]=\"iconSvg\"\n></div>\n", styles: [":host{display:contents}.lib-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.lib-icon svg{width:auto;max-width:100%;min-width:0;min-height:0;display:block}.lib-icon.lg{height:1.5rem}.lib-icon.md{height:1.25rem}.lib-icon.sm{height:1rem}.lib-icon.xs{height:.875rem}\n"] }]
|
|
2395
2396
|
}], ctorParameters: () => [{ type: i1.DomSanitizer }], propDecorators: { size: [{
|
|
2396
2397
|
type: Input
|
|
2397
2398
|
}], icon: [{
|