@aaamb/ngx-design-system 0.1.0

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.
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # ngx-aaamb-design-system
2
+
3
+ Angular component library for AAAMB projects.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install ngx-aaamb-design-system
9
+ ```
10
+
11
+ ### Peer Dependencies
12
+
13
+ This library requires Angular 21+:
14
+
15
+ ```bash
16
+ npm install @angular/common@^21.0.0 @angular/core@^21.0.0
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ Import components directly into your standalone components or modules:
22
+
23
+ ```typescript
24
+ import { ButtonComponent } from 'ngx-aaamb-design-system';
25
+
26
+ @Component({
27
+ imports: [ButtonComponent],
28
+ ...
29
+ })
30
+ export class MyComponent {}
31
+ ```
32
+
33
+ ## Available Components
34
+
35
+ - **ButtonComponent** - Configurable button with variant and size support
36
+
37
+ ## Development
38
+
39
+ ### Storybook
40
+
41
+ ```bash
42
+ npm run storybook
43
+ ```
44
+
45
+ ### Build the library
46
+
47
+ ```bash
48
+ npm run build
49
+ ```
50
+
51
+ ### Run tests
52
+
53
+ ```bash
54
+ npm test
55
+ ```
56
+
57
+ ## License
58
+
59
+ BUSL-1.1 - See [LICENSE](LICENSE) for details.
@@ -0,0 +1,38 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, Component } from '@angular/core';
3
+
4
+ const VARIANT_STRUCTURE = {
5
+ primary: 'font-poppins font-semibold text-base leading-3 rounded-[44px] px-16 py-4',
6
+ secondary: 'font-poppins font-normal text-lg leading-6 rounded-[5px] px-3 py-1',
7
+ };
8
+ const VARIANT_COLOR = {
9
+ primary: {
10
+ green: 'bg-green-base text-neutral-light-text hover:bg-green-hover active:bg-green-active disabled:bg-neutral-disabled-bg disabled:text-neutral-disabled-text',
11
+ },
12
+ secondary: {
13
+ green: 'bg-green-base text-neutral-light-text hover:bg-green-hover active:bg-green-active disabled:bg-neutral-disabled-bg disabled:text-neutral-disabled-text',
14
+ },
15
+ };
16
+ class ButtonComponent {
17
+ variant = input('primary', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
18
+ color = input('green', ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
19
+ hostClasses = computed(() => `inline-flex items-center justify-center cursor-pointer transition-colors disabled:pointer-events-none disabled:cursor-not-allowed ${VARIANT_STRUCTURE[this.variant()]} ${VARIANT_COLOR[this.variant()][this.color()]}`, ...(ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []));
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
21
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", type: ButtonComponent, isStandalone: true, selector: "button[aaamb-button]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClasses()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
22
+ }
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ButtonComponent, decorators: [{
24
+ type: Component,
25
+ args: [{
26
+ selector: 'button[aaamb-button]',
27
+ standalone: true,
28
+ host: { '[class]': 'hostClasses()' },
29
+ template: `<ng-content />`,
30
+ }]
31
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
32
+
33
+ /**
34
+ * Generated bundle index. Do not edit.
35
+ */
36
+
37
+ export { ButtonComponent };
38
+ //# sourceMappingURL=aaamb-ngx-design-system.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aaamb-ngx-design-system.mjs","sources":["../../../src/components/button/button.component.ts","../../../src/aaamb-ngx-design-system.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\nimport { ButtonVariant, ButtonColor } from '../../core/types';\n\nconst VARIANT_STRUCTURE: Record<ButtonVariant, string> = {\n primary: 'font-poppins font-semibold text-base leading-3 rounded-[44px] px-16 py-4',\n secondary: 'font-poppins font-normal text-lg leading-6 rounded-[5px] px-3 py-1',\n};\n\nconst VARIANT_COLOR: Record<ButtonVariant, Record<ButtonColor, string>> = {\n primary: {\n green:\n 'bg-green-base text-neutral-light-text hover:bg-green-hover active:bg-green-active disabled:bg-neutral-disabled-bg disabled:text-neutral-disabled-text',\n },\n secondary: {\n green:\n 'bg-green-base text-neutral-light-text hover:bg-green-hover active:bg-green-active disabled:bg-neutral-disabled-bg disabled:text-neutral-disabled-text',\n },\n};\n\n@Component({\n selector: 'button[aaamb-button]',\n standalone: true,\n host: { '[class]': 'hostClasses()' },\n template: `<ng-content />`,\n})\nexport class ButtonComponent {\n variant = input<ButtonVariant>('primary');\n color = input<ButtonColor>('green');\n\n hostClasses = computed(\n () =>\n `inline-flex items-center justify-center cursor-pointer transition-colors disabled:pointer-events-none disabled:cursor-not-allowed ${VARIANT_STRUCTURE[this.variant()]} ${VARIANT_COLOR[this.variant()][this.color()]}`,\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AAGA,MAAM,iBAAiB,GAAkC;AACvD,IAAA,OAAO,EAAE,0EAA0E;AACnF,IAAA,SAAS,EAAE,oEAAoE;CAChF;AAED,MAAM,aAAa,GAAuD;AACxE,IAAA,OAAO,EAAE;AACP,QAAA,KAAK,EACH,uJAAuJ;AAC1J,KAAA;AACD,IAAA,SAAS,EAAE;AACT,QAAA,KAAK,EACH,uJAAuJ;AAC1J,KAAA;CACF;MAQY,eAAe,CAAA;AAC1B,IAAA,OAAO,GAAG,KAAK,CAAgB,SAAS,8EAAC;AACzC,IAAA,KAAK,GAAG,KAAK,CAAc,OAAO,4EAAC;AAEnC,IAAA,WAAW,GAAG,QAAQ,CACpB,MACE,CAAA,kIAAA,EAAqI,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA,CAAA,EAAI,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAA,CAAE,kFAC1N;uGAPU,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAf,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAe,sYAFhB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAN3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE;AACpC,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACxBD;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@aaamb/ngx-design-system",
3
+ "version": "0.1.0",
4
+ "description": "Angular component library for AAAMB projects",
5
+ "author": "aaamb tech",
6
+ "license": "BUSL-1.1",
7
+ "keywords": [
8
+ "angular",
9
+ "design-system",
10
+ "components",
11
+ "aaamb"
12
+ ],
13
+ "private": false,
14
+ "sideEffects": false,
15
+ "peerDependencies": {
16
+ "@angular/common": "^21.0.0",
17
+ "@angular/core": "^21.0.0"
18
+ },
19
+ "dependencies": {
20
+ "tslib": "^2.3.0"
21
+ },
22
+ "module": "fesm2022/aaamb-ngx-design-system.mjs",
23
+ "typings": "types/aaamb-ngx-design-system.d.ts",
24
+ "exports": {
25
+ "./package.json": {
26
+ "default": "./package.json"
27
+ },
28
+ ".": {
29
+ "types": "./types/aaamb-ngx-design-system.d.ts",
30
+ "default": "./fesm2022/aaamb-ngx-design-system.mjs"
31
+ }
32
+ }
33
+ }
Binary file
@@ -0,0 +1,25 @@
1
+ @font-face {
2
+ font-family: 'Poppins';
3
+ src: url('./fonts/Poppins-Regular.ttf') format('truetype');
4
+ font-weight: 400;
5
+ font-display: swap;
6
+ }
7
+
8
+ @font-face {
9
+ font-family: 'Poppins';
10
+ src: url('./fonts/Poppins-SemiBold.ttf') format('truetype');
11
+ font-weight: 600;
12
+ font-display: swap;
13
+ }
14
+
15
+ @theme {
16
+ --font-poppins: 'Poppins', sans-serif;
17
+
18
+ --color-green-base: #014744;
19
+ --color-green-hover: #0B645C;
20
+ --color-green-active: #2D484C;
21
+
22
+ --color-neutral-disabled-bg: #E7E7E7;
23
+ --color-neutral-disabled-text: #B0B0B0;
24
+ --color-neutral-light-text: #F6F6F6;
25
+ }
@@ -0,0 +1,15 @@
1
+ import * as _angular_core from '@angular/core';
2
+
3
+ type ButtonVariant = 'primary' | 'secondary';
4
+ type ButtonColor = 'green';
5
+
6
+ declare class ButtonComponent {
7
+ variant: _angular_core.InputSignal<ButtonVariant>;
8
+ color: _angular_core.InputSignal<"green">;
9
+ hostClasses: _angular_core.Signal<string>;
10
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
11
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "button[aaamb-button]", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
12
+ }
13
+
14
+ export { ButtonComponent };
15
+ export type { ButtonColor, ButtonVariant };