Browse Source

Update to v0.60.0

Angel Ruiz (aka SirKeldon) 1 year ago
parent
commit
b2dbb1d5c2

File diff suppressed because it is too large
+ 11 - 4
esm2022/lib/components/atoms/button/button.component.mjs


File diff suppressed because it is too large
+ 5 - 5
esm2022/lib/components/atoms/icon/icon.component.mjs


+ 2 - 0
esm2022/lib/model/size.type.mjs

@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2l6ZS50eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2lyY2xldG9uZS9zcmMvbGliL21vZGVsL3NpemUudHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgU2l6ZVR5cGUgPSAneHMnIHwgJ3NtJyB8ICdiYXNlJyB8ICdsZycgfCAneGwnO1xuIl19

+ 15 - 9
fesm2022/circletone.mjs

@@ -20,7 +20,7 @@ class IconComponent {
         this.fill = 'currentColor';
         this.fill = 'currentColor';
         this.strokeWidth = 1.5;
         this.strokeWidth = 1.5;
         this.strokeColor = 'currentColor';
         this.strokeColor = 'currentColor';
-        this.size = '6';
+        this.size = 'base';
         this.iconPath = '';
         this.iconPath = '';
     }
     }
     ngOnInit() {
     ngOnInit() {
@@ -44,12 +44,12 @@ class IconComponent {
         this.renderer.setStyle(svgElement, 'display', 'none');
         this.renderer.setStyle(svgElement, 'display', 'none');
         this.renderer.appendChild(this.document.body, svgElement);
         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,
             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: [{
         }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: Document, decorators: [{
                     type: Inject,
                     type: Inject,
                     args: [DOCUMENT]
                     args: [DOCUMENT]
@@ -73,13 +73,15 @@ class ButtonComponent {
         this.type = 'default';
         this.type = 'default';
         this.size = 'base';
         this.size = 'base';
         this.variant = 'default';
         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,
             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: [{
         }], propDecorators: { text: [{
                 type: Input,
                 type: Input,
                 args: [{ required: true }]
                 args: [{ required: true }]
@@ -89,6 +91,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
                 type: Input
                 type: Input
             }], variant: [{
             }], variant: [{
                 type: Input
                 type: Input
+            }], icon: [{
+                type: Input
+            }], iconSize: [{
+                type: Input
             }] } });
             }] } });
 
 
 /*
 /*

File diff suppressed because it is too large
+ 0 - 0
fesm2022/circletone.mjs.map


+ 5 - 2
lib/components/atoms/button/button.component.d.ts

@@ -1,9 +1,12 @@
+import { SizeType } from '../../../model/size.type';
 import * as i0 from "@angular/core";
 import * as i0 from "@angular/core";
 export declare class ButtonComponent {
 export declare class ButtonComponent {
     text: string;
     text: string;
     type: 'default' | 'alternate' | 'success' | 'warning' | 'error';
     type: 'default' | 'alternate' | 'success' | 'warning' | 'error';
-    size: 'xs' | 'sm' | 'base' | 'lg' | 'xl';
+    size: SizeType;
     variant: 'default' | 'outline';
     variant: 'default' | 'outline';
+    icon?: string;
+    iconSize?: SizeType;
     static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
     static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
-    static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "ct-button", never, { "text": { "alias": "text"; "required": true; }; "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, never, true, never>;
+    static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "ct-button", never, { "text": { "alias": "text"; "required": true; }; "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconSize": { "alias": "iconSize"; "required": false; }; }, {}, never, never, true, never>;
 }
 }

+ 1 - 1
lib/components/atoms/icon/icon.component.d.ts

@@ -9,7 +9,7 @@ export declare class IconComponent implements OnInit {
     fill: string;
     fill: string;
     strokeWidth: number;
     strokeWidth: number;
     strokeColor: string;
     strokeColor: string;
-    size: string;
+    size: 'xs' | 'sm' | 'base' | 'lg' | 'xl';
     iconPath: string;
     iconPath: string;
     constructor(renderer: Renderer2, document: Document, el: ElementRef);
     constructor(renderer: Renderer2, document: Document, el: ElementRef);
     ngOnInit(): void;
     ngOnInit(): void;

+ 1 - 0
lib/model/size.type.d.ts

@@ -0,0 +1 @@
+export type SizeType = 'xs' | 'sm' | 'base' | 'lg' | 'xl';

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "circletone",
   "name": "circletone",
-  "version": "0.59.0",
+  "version": "0.60.0",
   "peerDependencies": {
   "peerDependencies": {
     "@angular/common": "^17.3.0",
     "@angular/common": "^17.3.0",
     "@angular/core": "^17.3.0"
     "@angular/core": "^17.3.0"

Some files were not shown because too many files changed in this diff