|
@@ -20,7 +20,7 @@ class IconComponent {
|
|
|
this.fill = 'currentColor';
|
|
|
this.strokeWidth = 1.5;
|
|
|
this.strokeColor = 'currentColor';
|
|
|
- this.size = '6';
|
|
|
+ this.size = 'base';
|
|
|
this.iconPath = '';
|
|
|
}
|
|
|
ngOnInit() {
|
|
@@ -44,12 +44,12 @@ class IconComponent {
|
|
|
this.renderer.setStyle(svgElement, 'display', 'none');
|
|
|
this.renderer.appendChild(this.document.body, svgElement);
|
|
|
}
|
|
|
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: IconComponent, deps: [{ token: i0.Renderer2 }, { token: DOCUMENT }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
|
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: IconComponent, isStandalone: true, selector: "ct-icon", inputs: { icon: "icon", iconClass: "iconClass", fill: "fill", strokeWidth: "strokeWidth", strokeColor: "strokeColor", size: "size" }, ngImport: i0, template: "<svg\n [ngClass]=\"iconClass\"\n [attr.fill]=\"fill\"\n [attr.stroke-width]=\"strokeWidth\"\n [attr.stroke]=\"strokeColor\"\n class=\"flex size-full\">\n <use [attr.xlink:href]=\"getIconPath()\"></use>\n</svg>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
|
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: IconComponent, deps: [{ token: i0.Renderer2 }, { token: DOCUMENT }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
|
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: IconComponent, isStandalone: true, selector: "ct-icon", inputs: { icon: "icon", iconClass: "iconClass", fill: "fill", strokeWidth: "strokeWidth", strokeColor: "strokeColor", size: "size" }, ngImport: i0, template: "<svg\n [ngClass]=\"iconClass\"\n [attr.fill]=\"fill\"\n [attr.stroke-width]=\"strokeWidth\"\n [attr.stroke]=\"strokeColor\"\n class=\"flex\"\n [class.size-3]=\"size === 'xs'\"\n [class.size-4]=\"size === 'sm'\"\n [class.size-5]=\"size === 'base'\"\n [class.size-6]=\"size === 'lg'\"\n [class.size-8]=\"size === 'xl'\">\n <use [attr.xlink:href]=\"getIconPath()\"></use>\n</svg>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
|
}
|
|
|
-i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: IconComponent, decorators: [{
|
|
|
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: IconComponent, decorators: [{
|
|
|
type: Component,
|
|
|
- args: [{ selector: 'ct-icon', standalone: true, imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg\n [ngClass]=\"iconClass\"\n [attr.fill]=\"fill\"\n [attr.stroke-width]=\"strokeWidth\"\n [attr.stroke]=\"strokeColor\"\n class=\"flex size-full\">\n <use [attr.xlink:href]=\"getIconPath()\"></use>\n</svg>\n" }]
|
|
|
+ args: [{ selector: 'ct-icon', standalone: true, imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg\n [ngClass]=\"iconClass\"\n [attr.fill]=\"fill\"\n [attr.stroke-width]=\"strokeWidth\"\n [attr.stroke]=\"strokeColor\"\n class=\"flex\"\n [class.size-3]=\"size === 'xs'\"\n [class.size-4]=\"size === 'sm'\"\n [class.size-5]=\"size === 'base'\"\n [class.size-6]=\"size === 'lg'\"\n [class.size-8]=\"size === 'xl'\">\n <use [attr.xlink:href]=\"getIconPath()\"></use>\n</svg>\n" }]
|
|
|
}], ctorParameters: () => [{ type: i0.Renderer2 }, { type: Document, decorators: [{
|
|
|
type: Inject,
|
|
|
args: [DOCUMENT]
|
|
@@ -73,13 +73,15 @@ class ButtonComponent {
|
|
|
this.type = 'default';
|
|
|
this.size = 'base';
|
|
|
this.variant = 'default';
|
|
|
+ this.icon = undefined;
|
|
|
+ this.iconSize = undefined;
|
|
|
}
|
|
|
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
|
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.0", type: ButtonComponent, isStandalone: true, selector: "ct-button", inputs: { text: "text", type: "type", size: "size", variant: "variant" }, ngImport: i0, template: "<button\n class=\"rounded-md px-4 py-2\"\n [class.bg-primary]=\"type === 'default' && variant === 'default'\"\n [class.bg-on-primary]=\"type === 'alternate' && variant === 'default'\"\n [class.bg-yellow-400]=\"type === 'warning' && variant === 'default'\"\n [class.bg-red-400]=\"type === 'error' && variant === 'default'\"\n [class.bg-lime-600]=\"type === 'success' && variant === 'default'\"\n [class.border]=\"variant === 'outline'\"\n [class.border-primary]=\"type === 'default' && variant === 'outline'\">\n {{ text }}\n</button>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
|
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
|
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.1", type: ButtonComponent, isStandalone: true, selector: "ct-button", inputs: { text: "text", type: "type", size: "size", variant: "variant", icon: "icon", iconSize: "iconSize" }, ngImport: i0, template: "<button\n class=\"flex flex-row items-center gap-2 rounded-md px-4 py-2\"\n [class.bg-primary]=\"type === 'default' && variant === 'default'\"\n [class.bg-on-primary]=\"type === 'alternate' && variant === 'default'\"\n [class.bg-yellow-400]=\"type === 'warning' && variant === 'default'\"\n [class.bg-red-400]=\"type === 'error' && variant === 'default'\"\n [class.bg-lime-600]=\"type === 'success' && variant === 'default'\"\n [class.border]=\"variant === 'outline'\"\n [class.border-primary]=\"type === 'default' && variant === 'outline'\"\n [class.border-on-primary]=\"type === 'alternate' && variant === 'outline'\"\n [class.border-yellow-400]=\"type === 'warning' && variant === 'outline'\"\n [class.border-red-400]=\"type === 'error' && variant === 'outline'\"\n [class.border-lime-600]=\"type === 'success' && variant === 'outline'\">\n @if (icon) {\n <ct-icon class=\"flex\" [size]=\"iconSize || 'base'\" [icon]=\"icon\" />\n }\n {{ text }}\n</button>\n", dependencies: [{ kind: "component", type: IconComponent, selector: "ct-icon", inputs: ["icon", "iconClass", "fill", "strokeWidth", "strokeColor", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
|
}
|
|
|
-i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
|
+i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
|
type: Component,
|
|
|
- args: [{ selector: 'ct-button', standalone: true, imports: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n class=\"rounded-md px-4 py-2\"\n [class.bg-primary]=\"type === 'default' && variant === 'default'\"\n [class.bg-on-primary]=\"type === 'alternate' && variant === 'default'\"\n [class.bg-yellow-400]=\"type === 'warning' && variant === 'default'\"\n [class.bg-red-400]=\"type === 'error' && variant === 'default'\"\n [class.bg-lime-600]=\"type === 'success' && variant === 'default'\"\n [class.border]=\"variant === 'outline'\"\n [class.border-primary]=\"type === 'default' && variant === 'outline'\">\n {{ text }}\n</button>\n" }]
|
|
|
+ args: [{ selector: 'ct-button', standalone: true, imports: [IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n class=\"flex flex-row items-center gap-2 rounded-md px-4 py-2\"\n [class.bg-primary]=\"type === 'default' && variant === 'default'\"\n [class.bg-on-primary]=\"type === 'alternate' && variant === 'default'\"\n [class.bg-yellow-400]=\"type === 'warning' && variant === 'default'\"\n [class.bg-red-400]=\"type === 'error' && variant === 'default'\"\n [class.bg-lime-600]=\"type === 'success' && variant === 'default'\"\n [class.border]=\"variant === 'outline'\"\n [class.border-primary]=\"type === 'default' && variant === 'outline'\"\n [class.border-on-primary]=\"type === 'alternate' && variant === 'outline'\"\n [class.border-yellow-400]=\"type === 'warning' && variant === 'outline'\"\n [class.border-red-400]=\"type === 'error' && variant === 'outline'\"\n [class.border-lime-600]=\"type === 'success' && variant === 'outline'\">\n @if (icon) {\n <ct-icon class=\"flex\" [size]=\"iconSize || 'base'\" [icon]=\"icon\" />\n }\n {{ text }}\n</button>\n" }]
|
|
|
}], propDecorators: { text: [{
|
|
|
type: Input,
|
|
|
args: [{ required: true }]
|
|
@@ -89,6 +91,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
type: Input
|
|
|
}], variant: [{
|
|
|
type: Input
|
|
|
+ }], icon: [{
|
|
|
+ type: Input
|
|
|
+ }], iconSize: [{
|
|
|
+ type: Input
|
|
|
}] } });
|
|
|
|
|
|
/*
|