|
@@ -2,30 +2,6 @@ import { NgClass } from '@angular/common';
|
|
import * as i0 from '@angular/core';
|
|
import * as i0 from '@angular/core';
|
|
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
|
|
|
|
-class ButtonComponent {
|
|
|
|
- constructor() {
|
|
|
|
- this.text = '';
|
|
|
|
- this.type = 'default';
|
|
|
|
- this.size = 'base';
|
|
|
|
- this.variant = 'default';
|
|
|
|
- }
|
|
|
|
- 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 [ngClass]=\"{\n 'bg-primary': type === 'default' && variant === 'default',\n 'bg-on-primary': type === 'alternate' && variant === 'default',\n 'bg-yellow-400': type === 'warning' && variant === 'default',\n 'bg-red-400': type === 'error' && variant === 'default',\n 'bg-lime-600': type === 'success' && variant === 'default',\n 'border-primary': type === 'default' && variant === 'outline',\n 'border-on-primary': type === 'alternate' && variant === 'outline',\n 'border-yellow-400': type === 'warning' && variant === 'outline',\n 'border-red-400': type === 'error' && variant === 'outline',\n 'border-lime-600': type === 'success' && variant === 'outline',\n 'px-3 py-2 text-xs text-center': size === 'xs',\n 'px-3 py-2 text-sm text-center': size === 'sm',\n 'px-5 py-3 text-sm text-center': size === 'base',\n 'px-5 py-3 text-base text-center': size === 'lg',\n 'px-6 py-3.5 text-base text-center': size === 'xl'\n }\"\n class=\"rounded-md border-0 bg-transparent\">\n {{ text }}\n</button>\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: ButtonComponent, decorators: [{
|
|
|
|
- type: Component,
|
|
|
|
- args: [{ selector: 'ct-button', standalone: true, imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n [ngClass]=\"{\n 'bg-primary': type === 'default' && variant === 'default',\n 'bg-on-primary': type === 'alternate' && variant === 'default',\n 'bg-yellow-400': type === 'warning' && variant === 'default',\n 'bg-red-400': type === 'error' && variant === 'default',\n 'bg-lime-600': type === 'success' && variant === 'default',\n 'border-primary': type === 'default' && variant === 'outline',\n 'border-on-primary': type === 'alternate' && variant === 'outline',\n 'border-yellow-400': type === 'warning' && variant === 'outline',\n 'border-red-400': type === 'error' && variant === 'outline',\n 'border-lime-600': type === 'success' && variant === 'outline',\n 'px-3 py-2 text-xs text-center': size === 'xs',\n 'px-3 py-2 text-sm text-center': size === 'sm',\n 'px-5 py-3 text-sm text-center': size === 'base',\n 'px-5 py-3 text-base text-center': size === 'lg',\n 'px-6 py-3.5 text-base text-center': size === 'xl'\n }\"\n class=\"rounded-md border-0 bg-transparent\">\n {{ text }}\n</button>\n" }]
|
|
|
|
- }], propDecorators: { text: [{
|
|
|
|
- type: Input,
|
|
|
|
- args: [{ required: true }]
|
|
|
|
- }], type: [{
|
|
|
|
- type: Input
|
|
|
|
- }], size: [{
|
|
|
|
- type: Input
|
|
|
|
- }], variant: [{
|
|
|
|
- type: Input
|
|
|
|
- }] } });
|
|
|
|
-
|
|
|
|
class IconComponent {
|
|
class IconComponent {
|
|
constructor() {
|
|
constructor() {
|
|
this.icon = '';
|
|
this.icon = '';
|
|
@@ -37,7 +13,7 @@ class IconComponent {
|
|
this.iconPath = '';
|
|
this.iconPath = '';
|
|
}
|
|
}
|
|
ngOnInit() {
|
|
ngOnInit() {
|
|
- this.iconPath = this.getIconPath();
|
|
|
|
|
|
+ this.iconPath = '';
|
|
this.strokeColor = this.getFormattedColor(this.strokeColor);
|
|
this.strokeColor = this.getFormattedColor(this.strokeColor);
|
|
this.fill = this.getFormattedColor(this.fill);
|
|
this.fill = this.getFormattedColor(this.fill);
|
|
}
|
|
}
|
|
@@ -48,9 +24,6 @@ class IconComponent {
|
|
}
|
|
}
|
|
return color;
|
|
return color;
|
|
}
|
|
}
|
|
- getIconPath() {
|
|
|
|
- return `./icons.svg#${this.icon}`;
|
|
|
|
- }
|
|
|
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: IconComponent, deps: [], 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]=\"iconPath\"></use>\n</svg>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
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]=\"iconPath\"></use>\n</svg>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
}
|
|
}
|
|
@@ -71,6 +44,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
type: Input
|
|
type: Input
|
|
}] } });
|
|
}] } });
|
|
|
|
|
|
|
|
+class ButtonComponent {
|
|
|
|
+ constructor() {
|
|
|
|
+ this.text = '';
|
|
|
|
+ this.type = 'default';
|
|
|
|
+ this.size = 'base';
|
|
|
|
+ this.variant = 'default';
|
|
|
|
+ }
|
|
|
|
+ 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 [ngClass]=\"{\n 'bg-primary': type === 'default' && variant === 'default',\n 'bg-on-primary': type === 'alternate' && variant === 'default',\n 'bg-yellow-400': type === 'warning' && variant === 'default',\n 'bg-red-400': type === 'error' && variant === 'default',\n 'bg-lime-600': type === 'success' && variant === 'default',\n 'border-primary': type === 'default' && variant === 'outline',\n 'border-on-primary': type === 'alternate' && variant === 'outline',\n 'border-yellow-400': type === 'warning' && variant === 'outline',\n 'border-red-400': type === 'error' && variant === 'outline',\n 'border-lime-600': type === 'success' && variant === 'outline',\n 'px-3 py-2 text-xs text-center': size === 'xs',\n 'px-3 py-2 text-sm text-center': size === 'sm',\n 'px-5 py-3 text-sm text-center': size === 'base',\n 'px-5 py-3 text-base text-center': size === 'lg',\n 'px-6 py-3.5 text-base text-center': size === 'xl'\n }\"\n class=\"rounded-md border-0 bg-transparent\">\n {{ text }}\n</button>\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: ButtonComponent, decorators: [{
|
|
|
|
+ type: Component,
|
|
|
|
+ args: [{ selector: 'ct-button', standalone: true, imports: [NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button\n [ngClass]=\"{\n 'bg-primary': type === 'default' && variant === 'default',\n 'bg-on-primary': type === 'alternate' && variant === 'default',\n 'bg-yellow-400': type === 'warning' && variant === 'default',\n 'bg-red-400': type === 'error' && variant === 'default',\n 'bg-lime-600': type === 'success' && variant === 'default',\n 'border-primary': type === 'default' && variant === 'outline',\n 'border-on-primary': type === 'alternate' && variant === 'outline',\n 'border-yellow-400': type === 'warning' && variant === 'outline',\n 'border-red-400': type === 'error' && variant === 'outline',\n 'border-lime-600': type === 'success' && variant === 'outline',\n 'px-3 py-2 text-xs text-center': size === 'xs',\n 'px-3 py-2 text-sm text-center': size === 'sm',\n 'px-5 py-3 text-sm text-center': size === 'base',\n 'px-5 py-3 text-base text-center': size === 'lg',\n 'px-6 py-3.5 text-base text-center': size === 'xl'\n }\"\n class=\"rounded-md border-0 bg-transparent\">\n {{ text }}\n</button>\n" }]
|
|
|
|
+ }], propDecorators: { text: [{
|
|
|
|
+ type: Input,
|
|
|
|
+ args: [{ required: true }]
|
|
|
|
+ }], type: [{
|
|
|
|
+ type: Input
|
|
|
|
+ }], size: [{
|
|
|
|
+ type: Input
|
|
|
|
+ }], variant: [{
|
|
|
|
+ type: Input
|
|
|
|
+ }] } });
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* Public API Surface of circletone
|
|
* Public API Surface of circletone
|
|
*/
|
|
*/
|