Angel Ruiz (aka SirKeldon) před 1 rokem
revize
f35fcd5a21

+ 24 - 0
README.md

@@ -0,0 +1,24 @@
+# Circletone
+
+This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
+
+## Code scaffolding
+
+Run `ng generate component component-name --project circletone` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project circletone`.
+> Note: Don't forget to add `--project circletone` or else it will be added to the default project in your `angular.json` file. 
+
+## Build
+
+Run `ng build circletone` to build the project. The build artifacts will be stored in the `dist/` directory.
+
+## Publishing
+
+After building your library with `ng build circletone`, go to the dist folder `cd dist/circletone` and run `npm publish`.
+
+## Running unit tests
+
+Run `ng test circletone` to execute the unit tests via [Karma](https://karma-runner.github.io).
+
+## Further help
+
+To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

+ 5 - 0
esm2022/circletone.mjs

@@ -0,0 +1,5 @@
+/**
+ * Generated bundle index. Do not edit.
+ */
+export * from './public-api';
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2lyY2xldG9uZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NpcmNsZXRvbmUvc3JjL2NpcmNsZXRvbmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==

+ 20 - 0
esm2022/lib/components/atoms/button/button.component.mjs

@@ -0,0 +1,20 @@
+import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
+import * as i0 from "@angular/core";
+export class ButtonComponent {
+    constructor() {
+        this.text = '';
+        this.type = '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" }, ngImport: i0, template: "<button class=\"p-4\">{{ text }}</button>\n", 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: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button class=\"p-4\">{{ text }}</button>\n" }]
+        }], propDecorators: { text: [{
+                type: Input,
+                args: [{ required: true }]
+            }], type: [{
+                type: Input
+            }] } });
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NpcmNsZXRvbmUvc3JjL2xpYi9jb21wb25lbnRzL2F0b21zL2J1dHRvbi9idXR0b24uY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2lyY2xldG9uZS9zcmMvbGliL2NvbXBvbmVudHMvYXRvbXMvYnV0dG9uL2J1dHRvbi5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFTMUUsTUFBTSxPQUFPLGVBQWU7SUFQNUI7UUFRNkIsU0FBSSxHQUFHLEVBQUUsQ0FBQztRQUM1QixTQUFJLEdBQThELFNBQVMsQ0FBQztLQUN0Rjs4R0FIWSxlQUFlO2tHQUFmLGVBQWUsNkdDVDVCLDZDQUNBOzsyRkRRYSxlQUFlO2tCQVAzQixTQUFTOytCQUNFLFdBQVcsY0FDVCxJQUFJLFdBQ1AsRUFBRSxtQkFFTSx1QkFBdUIsQ0FBQyxNQUFNOzhCQUdwQixJQUFJO3NCQUE5QixLQUFLO3VCQUFDLEVBQUUsUUFBUSxFQUFFLElBQUksRUFBRTtnQkFDaEIsSUFBSTtzQkFBWixLQUFLIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3ksIENvbXBvbmVudCwgSW5wdXQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuQENvbXBvbmVudCh7XG4gIHNlbGVjdG9yOiAnY3QtYnV0dG9uJyxcbiAgc3RhbmRhbG9uZTogdHJ1ZSxcbiAgaW1wb3J0czogW10sXG4gIHRlbXBsYXRlVXJsOiAnLi9idXR0b24uY29tcG9uZW50Lmh0bWwnLFxuICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCxcbn0pXG5leHBvcnQgY2xhc3MgQnV0dG9uQ29tcG9uZW50IHtcbiAgQElucHV0KHsgcmVxdWlyZWQ6IHRydWUgfSkgdGV4dCA9ICcnO1xuICBASW5wdXQoKSB0eXBlOiAnZGVmYXVsdCcgfCAnYWx0ZXJuYXRlJyB8ICdzdWNjZXNzJyB8ICd3YXJuaW5nJyB8ICdlcnJvcicgPSAnZGVmYXVsdCc7XG59XG4iLCI8YnV0dG9uIGNsYXNzPVwicC00XCI+e3sgdGV4dCB9fTwvYnV0dG9uPlxuIl19

+ 5 - 0
esm2022/public-api.mjs

@@ -0,0 +1,5 @@
+/*
+ * Public API Surface of circletone
+ */
+export * from './lib/components/atoms/button/button.component';
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NpcmNsZXRvbmUvc3JjL3B1YmxpYy1hcGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGdEQUFnRCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBjaXJjbGV0b25lXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvY29tcG9uZW50cy9hdG9tcy9idXR0b24vYnV0dG9uLmNvbXBvbmVudCc7XG4iXX0=

+ 31 - 0
fesm2022/circletone.mjs

@@ -0,0 +1,31 @@
+import * as i0 from '@angular/core';
+import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
+
+class ButtonComponent {
+    constructor() {
+        this.text = '';
+        this.type = '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" }, ngImport: i0, template: "<button class=\"p-4\">{{ text }}</button>\n", 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: [], changeDetection: ChangeDetectionStrategy.OnPush, template: "<button class=\"p-4\">{{ text }}</button>\n" }]
+        }], propDecorators: { text: [{
+                type: Input,
+                args: [{ required: true }]
+            }], type: [{
+                type: Input
+            }] } });
+
+/*
+ * Public API Surface of circletone
+ */
+
+/**
+ * Generated bundle index. Do not edit.
+ */
+
+export { ButtonComponent };
+//# sourceMappingURL=circletone.mjs.map

+ 1 - 0
fesm2022/circletone.mjs.map

@@ -0,0 +1 @@
+{"version":3,"file":"circletone.mjs","sources":["../../../projects/circletone/src/lib/components/atoms/button/button.component.ts","../../../projects/circletone/src/lib/components/atoms/button/button.component.html","../../../projects/circletone/src/public-api.ts","../../../projects/circletone/src/circletone.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n  selector: 'ct-button',\n  standalone: true,\n  imports: [],\n  templateUrl: './button.component.html',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent {\n  @Input({ required: true }) text = '';\n  @Input() type: 'default' | 'alternate' | 'success' | 'warning' | 'error' = 'default';\n}\n","<button class=\"p-4\">{{ text }}</button>\n","/*\n * Public API Surface of circletone\n */\n\nexport * from './lib/components/atoms/button/button.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MASa,eAAe,CAAA;AAP5B,IAAA,WAAA,GAAA;QAQ6B,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAA,IAAA,GAA8D,SAAS,CAAC;AACtF,KAAA;8GAHY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,6GCT5B,6CACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FDQa,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,cACT,IAAI,EAAA,OAAA,EACP,EAAE,EAEM,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6CAAA,EAAA,CAAA;8BAGpB,IAAI,EAAA,CAAA;sBAA9B,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAA;gBAChB,IAAI,EAAA,CAAA;sBAAZ,KAAK;;;AEXR;;AAEG;;ACFH;;AAEG;;;;"}

+ 5 - 0
index.d.ts

@@ -0,0 +1,5 @@
+/**
+ * Generated bundle index. Do not edit.
+ */
+/// <amd-module name="circletone" />
+export * from './public-api';

+ 7 - 0
lib/components/atoms/button/button.component.d.ts

@@ -0,0 +1,7 @@
+import * as i0 from "@angular/core";
+export declare class ButtonComponent {
+    text: string;
+    type: 'default' | 'alternate' | 'success' | 'warning' | 'error';
+    static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
+    static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "ct-button", never, { "text": { "alias": "text"; "required": true; }; "type": { "alias": "type"; "required": false; }; }, {}, never, never, true, never>;
+}

+ 26 - 0
package.json

@@ -0,0 +1,26 @@
+{
+  "name": "circletone",
+  "version": "0.1.0",
+  "peerDependencies": {
+    "@angular/common": "^17.3.0",
+    "@angular/core": "^17.3.0"
+  },
+  "exports": {
+    "./tailwind.config": "./tailwind.preset.js",
+    "./package.json": {
+      "default": "./package.json"
+    },
+    ".": {
+      "types": "./index.d.ts",
+      "esm2022": "./esm2022/circletone.mjs",
+      "esm": "./esm2022/circletone.mjs",
+      "default": "./fesm2022/circletone.mjs"
+    }
+  },
+  "dependencies": {
+    "tslib": "^2.3.0"
+  },
+  "sideEffects": false,
+  "module": "fesm2022/circletone.mjs",
+  "typings": "index.d.ts"
+}

+ 1 - 0
public-api.d.ts

@@ -0,0 +1 @@
+export * from './lib/components/atoms/button/button.component';

+ 61 - 0
tailwind.preset.js

@@ -0,0 +1,61 @@
+var colors = require('tailwindcss/colors');
+
+module.exports = {
+  theme: {
+    extend: {
+      fontFamily: {
+        primary: 'var(--font-primary)',
+        title: 'var(--font-title)',
+        logo: 'var(--font-logo)',
+      },
+      colors: {
+        ...colors,
+        primary: {
+          DEFAULT: 'rgb(var(--primary) / <alpha-value>)',
+          dark: 'rgb(var(--priamry-dark) / <alpha-value>)',
+          variation: 'rgb(var(--primary-variation) / <alpha-value>)',
+          'variation-dark': 'rgb(var(--primary-variation-dark) / <alpha-value>)',
+        },
+        secondary: {
+          DEFAULT: 'rgb(var(--secondary) / <alpha-value>)',
+          dark: 'rgb(var(--secondary-dark) / <alpha-value>)',
+        },
+        background: {
+          DEFAULT: 'rgb(var(--background) / <alpha-value>)',
+          dark: 'rgb(var(--background-dark) / <alpha-value>)',
+        },
+        surface: {
+          DEFAULT: 'rgb(var(--surface) / <alpha-value>)',
+          variation: 'rgb(var(--surface-variation) / <alpha-value>)',
+          dark: 'rgb(var(--surface-dark) / <alpha-value>)',
+          'variation-dark': 'rgb(var(--surface-variation-dark) / <alpha-value>)',
+        },
+        accent: {
+          DEFAULT: 'rgb(var(--accent) / <alpha-value>)',
+          dark: 'rgb(var(--accent-dark) / <alpha-value>)',
+        },
+        on: {
+          primary: 'rgb(var(--on-primary) / <alpha-value>)',
+          'primary-variation': 'rgb(var(--on-primary-variation) / <alpha-value>)',
+          secondary: 'rgb(var(--on-secondary) / <alpha-value>)',
+          'secondary-variation': 'rgb(var(--on-secondary-variation) / <alpha-value>)',
+          accent: 'rgb(var(--on-accent) / <alpha-value>)',
+          background: 'rgb(var(--on-background) / <alpha-value>)',
+          'background-variation': 'rgb(var(--on-background-variation) / <alpha-value>)',
+          surface: 'rgb(var(--on-surface) / <alpha-value>)',
+          'surface-variation': 'rgb(var(--on-surface-variation) / <alpha-value>)',
+          'primary-dark': 'rgb(var(--on-primary-dark) / <alpha-value>)',
+          'primary-variation-dark': 'rgb(var(--on-primary-variation-dark) / <alpha-value>)',
+          'secondary-dark': 'rgb(var(--on-secondary-dark) / <alpha-value>)',
+          'secondary-variation-dark': 'rgb(var(--on-secondary-variation-dark) / <alpha-value>)',
+          'accent-dark': 'rgb(var(--on-accent-dark) / <alpha-value>)',
+          'background-dark': 'rgb(var(--on-background-dark) / <alpha-value>)',
+          'background-variation-dark': 'rgb(var(--on-background-variation-dark) / <alpha-value>)',
+          'surface-dark': 'rgb(var(--on-surface-dark) / <alpha-value>)',
+          'surface-variation-dark': 'rgb(var(--on-surface-variation-dark) / <alpha-value>)',
+        },
+      },
+    },
+  },
+  plugins: [],
+};