@hmscodes/honey-core 1.0.1 → 1.0.3
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 +18 -14
- package/fesm2022/honey-core.mjs +84 -0
- package/fesm2022/honey-core.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/button/button.component.d.ts +25 -0
- package/lib/honey-core.component.d.ts +5 -0
- package/lib/honey-core.service.d.ts +6 -0
- package/package.json +17 -42
- package/{projects/honey-core/src/public-api.ts → public-api.d.ts} +1 -4
- package/.editorconfig +0 -17
- package/.vscode/extensions.json +0 -4
- package/.vscode/launch.json +0 -20
- package/.vscode/tasks.json +0 -42
- package/angular.json +0 -61
- package/projects/honey-core/.storybook/main.ts +0 -18
- package/projects/honey-core/.storybook/preview.ts +0 -14
- package/projects/honey-core/.storybook/tsconfig.json +0 -11
- package/projects/honey-core/.storybook/typings.d.ts +0 -4
- package/projects/honey-core/README.md +0 -63
- package/projects/honey-core/ng-package.json +0 -7
- package/projects/honey-core/package.json +0 -12
- package/projects/honey-core/src/lib/components/button/button.component.html +0 -8
- package/projects/honey-core/src/lib/components/button/button.component.scss +0 -47
- package/projects/honey-core/src/lib/components/button/button.component.spec.ts +0 -23
- package/projects/honey-core/src/lib/components/button/button.component.ts +0 -44
- package/projects/honey-core/src/lib/honey-core.component.spec.ts +0 -23
- package/projects/honey-core/src/lib/honey-core.component.ts +0 -15
- package/projects/honey-core/src/lib/honey-core.service.spec.ts +0 -16
- package/projects/honey-core/src/lib/honey-core.service.ts +0 -9
- package/projects/honey-core/src/stories/.eslintrc.json +0 -5
- package/projects/honey-core/src/stories/Colors.mdx +0 -40
- package/projects/honey-core/src/stories/Presentation.mdx +0 -7
- package/projects/honey-core/src/stories/button.component.stories.ts +0 -67
- package/projects/honey-core/src/stories/button.css +0 -30
- package/projects/honey-core/src/stories/header.component.ts +0 -74
- package/projects/honey-core/src/stories/header.css +0 -32
- package/projects/honey-core/src/stories/header.stories.ts +0 -33
- package/projects/honey-core/src/stories/page.component.ts +0 -82
- package/projects/honey-core/src/stories/page.css +0 -68
- package/projects/honey-core/src/stories/page.stories.ts +0 -32
- package/projects/honey-core/src/stories/user.ts +0 -3
- package/projects/honey-core/src/styles/variables.scss +0 -18
- package/projects/honey-core/tsconfig.lib.json +0 -15
- package/projects/honey-core/tsconfig.lib.prod.json +0 -11
- package/projects/honey-core/tsconfig.spec.json +0 -15
- package/tsconfig.json +0 -32
package/README.md
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
# HoneyCore
|
|
2
2
|
|
|
3
|
-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.
|
|
4
|
-
|
|
5
|
-
## Development server
|
|
6
|
-
|
|
7
|
-
To start a local development server, run:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ng serve
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
|
|
14
4
|
|
|
15
5
|
## Code scaffolding
|
|
16
6
|
|
|
@@ -28,13 +18,27 @@ ng generate --help
|
|
|
28
18
|
|
|
29
19
|
## Building
|
|
30
20
|
|
|
31
|
-
To build the
|
|
21
|
+
To build the library, run:
|
|
32
22
|
|
|
33
23
|
```bash
|
|
34
|
-
ng build
|
|
24
|
+
ng build honey-core
|
|
35
25
|
```
|
|
36
26
|
|
|
37
|
-
This will compile your project and
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
```bash
|
|
35
|
+
cd dist/honey-core
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
+
```bash
|
|
40
|
+
npm publish
|
|
41
|
+
```
|
|
38
42
|
|
|
39
43
|
## Running unit tests
|
|
40
44
|
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, Component, EventEmitter, Output, Input } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class HoneyCoreService {
|
|
5
|
+
constructor() { }
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HoneyCoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HoneyCoreService, providedIn: 'root' });
|
|
8
|
+
}
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HoneyCoreService, decorators: [{
|
|
10
|
+
type: Injectable,
|
|
11
|
+
args: [{
|
|
12
|
+
providedIn: 'root'
|
|
13
|
+
}]
|
|
14
|
+
}], ctorParameters: () => [] });
|
|
15
|
+
|
|
16
|
+
class HoneyCoreComponent {
|
|
17
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HoneyCoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: HoneyCoreComponent, isStandalone: true, selector: "lib-honey-core", ngImport: i0, template: `
|
|
19
|
+
<p>
|
|
20
|
+
honey-core works!
|
|
21
|
+
</p>
|
|
22
|
+
`, isInline: true, styles: [""] });
|
|
23
|
+
}
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HoneyCoreComponent, decorators: [{
|
|
25
|
+
type: Component,
|
|
26
|
+
args: [{ selector: 'lib-honey-core', imports: [], template: `
|
|
27
|
+
<p>
|
|
28
|
+
honey-core works!
|
|
29
|
+
</p>
|
|
30
|
+
` }]
|
|
31
|
+
}] });
|
|
32
|
+
|
|
33
|
+
class HcButtonComponent {
|
|
34
|
+
/** Is this the principal call to action on the page? */
|
|
35
|
+
variant = 'primary';
|
|
36
|
+
/** What background color to use */
|
|
37
|
+
backgroundColor;
|
|
38
|
+
/** How large should the button be? */
|
|
39
|
+
size = 'medium';
|
|
40
|
+
/**
|
|
41
|
+
* Button contents
|
|
42
|
+
*
|
|
43
|
+
* @required
|
|
44
|
+
*/
|
|
45
|
+
label = 'Button';
|
|
46
|
+
/**
|
|
47
|
+
* Disabled state of the button
|
|
48
|
+
*/
|
|
49
|
+
disabled = false;
|
|
50
|
+
/** Optional click handler */
|
|
51
|
+
onClick = new EventEmitter();
|
|
52
|
+
get classes() {
|
|
53
|
+
return ['hc-button', `hc-${this.size}`, `hc-${this.variant}`];
|
|
54
|
+
}
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HcButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: HcButtonComponent, isStandalone: true, selector: "hc-button", inputs: { variant: "variant", backgroundColor: "backgroundColor", size: "size", label: "label", disabled: "disabled" }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<button\n type=\"button\"\n [class]=\"classes\"\n [disabled]=\"disabled\"\n (click)=\"onClick.emit($event)\"\n>\n <ng-content />\n</button>", styles: [".hc-button{display:inline-block;cursor:pointer;border:0;border-radius:4px;font-weight:700;line-height:1;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.hc-button:disabled{cursor:not-allowed;background:var(--hc-disabled-bg);color:var(--hc-disabled-text)}.hc-button:disabled:hover{background:var(--hc-disabled-bg);color:var(--hc-disabled-text)}.hc-primary{background-color:var(--hc-background-primary);color:#fff}.hc-primary:hover{background-color:var(--hc-background-primary-hover)}.hc-secondary{background-color:var(--hc-secondary-500);color:#fff}.hc-small{padding:10px 16px;font-size:12px}.hc-medium{padding:10px 20px;font-size:14px}.hc-large{padding:12px 24px;font-size:16px}\n"] });
|
|
57
|
+
}
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: HcButtonComponent, decorators: [{
|
|
59
|
+
type: Component,
|
|
60
|
+
args: [{ selector: 'hc-button', imports: [], standalone: true, template: "<button\n type=\"button\"\n [class]=\"classes\"\n [disabled]=\"disabled\"\n (click)=\"onClick.emit($event)\"\n>\n <ng-content />\n</button>", styles: [".hc-button{display:inline-block;cursor:pointer;border:0;border-radius:4px;font-weight:700;line-height:1;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.hc-button:disabled{cursor:not-allowed;background:var(--hc-disabled-bg);color:var(--hc-disabled-text)}.hc-button:disabled:hover{background:var(--hc-disabled-bg);color:var(--hc-disabled-text)}.hc-primary{background-color:var(--hc-background-primary);color:#fff}.hc-primary:hover{background-color:var(--hc-background-primary-hover)}.hc-secondary{background-color:var(--hc-secondary-500);color:#fff}.hc-small{padding:10px 16px;font-size:12px}.hc-medium{padding:10px 20px;font-size:14px}.hc-large{padding:12px 24px;font-size:16px}\n"] }]
|
|
61
|
+
}], propDecorators: { variant: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], backgroundColor: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], size: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], label: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], disabled: [{
|
|
70
|
+
type: Input
|
|
71
|
+
}], onClick: [{
|
|
72
|
+
type: Output
|
|
73
|
+
}] } });
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
* Public API Surface of honey-core
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Generated bundle index. Do not edit.
|
|
81
|
+
*/
|
|
82
|
+
|
|
83
|
+
export { HcButtonComponent, HoneyCoreComponent, HoneyCoreService };
|
|
84
|
+
//# sourceMappingURL=honey-core.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"honey-core.mjs","sources":["../../../projects/honey-core/src/lib/honey-core.service.ts","../../../projects/honey-core/src/lib/honey-core.component.ts","../../../projects/honey-core/src/lib/components/button/button.component.ts","../../../projects/honey-core/src/lib/components/button/button.component.html","../../../projects/honey-core/src/public-api.ts","../../../projects/honey-core/src/honey-core.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class HoneyCoreService {\n\n constructor() { }\n}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-honey-core',\n imports: [],\n template: `\n <p>\n honey-core works!\n </p>\n `,\n styles: ``\n})\nexport class HoneyCoreComponent {\n\n}\n","import { Component, Input, Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'hc-button',\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n imports: [],\n standalone: true,\n})\nexport class HcButtonComponent {\n /** Is this the principal call to action on the page? */\n @Input()\n variant: 'primary' | 'secondary' = 'primary';\n\n /** What background color to use */\n @Input()\n backgroundColor?: string;\n\n /** How large should the button be? */\n @Input()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Button contents\n *\n * @required\n */\n @Input()\n label = 'Button';\n\n /**\n * Disabled state of the button\n */\n @Input()\n disabled = false;\n\n /** Optional click handler */\n @Output()\n onClick = new EventEmitter<Event>();\n\n public get classes(): string[] {\n return ['hc-button', `hc-${this.size}`, `hc-${this.variant}`];\n }\n}\n","<button\n type=\"button\"\n [class]=\"classes\"\n [disabled]=\"disabled\"\n (click)=\"onClick.emit($event)\"\n>\n <ng-content />\n</button>","/*\n * Public API Surface of honey-core\n */\n\nexport * from './lib/honey-core.service';\nexport * from './lib/honey-core.component';\nexport * from './lib/components/button/button.component';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAKa,gBAAgB,CAAA;AAE3B,IAAA,WAAA,GAAA;uGAFW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAhB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,cAFf,MAAM,EAAA,CAAA;;2FAEP,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAH5B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCQY,kBAAkB,CAAA;uGAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,EAPnB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGU,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAV9B,SAAS;+BACE,gBAAgB,EAAA,OAAA,EACjB,EAAE,EACD,QAAA,EAAA;;;;AAIT,EAAA,CAAA,EAAA;;;MCAU,iBAAiB,CAAA;;IAG5B,OAAO,GAA6B,SAAS;;AAI7C,IAAA,eAAe;;IAIf,IAAI,GAAiC,QAAQ;AAE7C;;;;AAIG;IAEH,KAAK,GAAG,QAAQ;AAEhB;;AAEG;IAEH,QAAQ,GAAG,KAAK;;AAIhB,IAAA,OAAO,GAAG,IAAI,YAAY,EAAS;AAEnC,IAAA,IAAW,OAAO,GAAA;AAChB,QAAA,OAAO,CAAC,WAAW,EAAE,CAAA,GAAA,EAAM,IAAI,CAAC,IAAI,CAAE,CAAA,EAAE,MAAM,IAAI,CAAC,OAAO,CAAA,CAAE,CAAC;;uGAhCpD,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,8NCT9B,kJAOS,EAAA,MAAA,EAAA,CAAA,4rBAAA,CAAA,EAAA,CAAA;;2FDEI,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;+BACE,WAAW,EAAA,OAAA,EAGZ,EAAE,EAAA,UAAA,EACC,IAAI,EAAA,QAAA,EAAA,kJAAA,EAAA,MAAA,EAAA,CAAA,4rBAAA,CAAA,EAAA;8BAKhB,OAAO,EAAA,CAAA;sBADN;gBAKD,eAAe,EAAA,CAAA;sBADd;gBAKD,IAAI,EAAA,CAAA;sBADH;gBASD,KAAK,EAAA,CAAA;sBADJ;gBAOD,QAAQ,EAAA,CAAA;sBADP;gBAKD,OAAO,EAAA,CAAA;sBADN;;;AErCH;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class HcButtonComponent {
|
|
4
|
+
/** Is this the principal call to action on the page? */
|
|
5
|
+
variant: 'primary' | 'secondary';
|
|
6
|
+
/** What background color to use */
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
/** How large should the button be? */
|
|
9
|
+
size: 'small' | 'medium' | 'large';
|
|
10
|
+
/**
|
|
11
|
+
* Button contents
|
|
12
|
+
*
|
|
13
|
+
* @required
|
|
14
|
+
*/
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* Disabled state of the button
|
|
18
|
+
*/
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
/** Optional click handler */
|
|
21
|
+
onClick: EventEmitter<Event>;
|
|
22
|
+
get classes(): string[];
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HcButtonComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HcButtonComponent, "hc-button", never, { "variant": { "alias": "variant"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onClick": "onClick"; }, never, ["*"], true, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class HoneyCoreComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HoneyCoreComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HoneyCoreComponent, "lib-honey-core", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
package/package.json
CHANGED
|
@@ -1,48 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmscodes/honey-core",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"build": "ng build",
|
|
8
|
-
"watch": "ng build --watch --configuration development",
|
|
9
|
-
"test": "ng test",
|
|
10
|
-
"storybook": "ng run honey-core:storybook",
|
|
11
|
-
"build-storybook": "ng run honey-core:build-storybook"
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^19.2.0",
|
|
6
|
+
"@angular/core": "^19.2.0"
|
|
12
7
|
},
|
|
13
|
-
"private": false,
|
|
14
8
|
"dependencies": {
|
|
15
|
-
"
|
|
16
|
-
"@angular/compiler": "^19.2.0",
|
|
17
|
-
"@angular/core": "^19.2.0",
|
|
18
|
-
"@angular/forms": "^19.2.0",
|
|
19
|
-
"@angular/platform-browser": "^19.2.0",
|
|
20
|
-
"@angular/platform-browser-dynamic": "^19.2.0",
|
|
21
|
-
"@angular/router": "^19.2.0",
|
|
22
|
-
"rxjs": "~7.8.0",
|
|
23
|
-
"tslib": "^2.3.0",
|
|
24
|
-
"zone.js": "~0.15.0"
|
|
9
|
+
"tslib": "^2.3.0"
|
|
25
10
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"jasmine-core": "~5.6.0",
|
|
38
|
-
"karma": "~6.4.0",
|
|
39
|
-
"karma-chrome-launcher": "~3.2.0",
|
|
40
|
-
"karma-coverage": "~2.2.0",
|
|
41
|
-
"karma-jasmine": "~5.1.0",
|
|
42
|
-
"karma-jasmine-html-reporter": "~2.1.0",
|
|
43
|
-
"ng-packagr": "^19.2.0",
|
|
44
|
-
"sass": "^1.87.0",
|
|
45
|
-
"storybook": "^8.6.12",
|
|
46
|
-
"typescript": "~5.7.2"
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"module": "fesm2022/honey-core.mjs",
|
|
13
|
+
"typings": "index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"default": "./fesm2022/honey-core.mjs"
|
|
21
|
+
}
|
|
47
22
|
}
|
|
48
|
-
}
|
|
23
|
+
}
|
package/.editorconfig
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Editor configuration, see https://editorconfig.org
|
|
2
|
-
root = true
|
|
3
|
-
|
|
4
|
-
[*]
|
|
5
|
-
charset = utf-8
|
|
6
|
-
indent_style = space
|
|
7
|
-
indent_size = 2
|
|
8
|
-
insert_final_newline = true
|
|
9
|
-
trim_trailing_whitespace = true
|
|
10
|
-
|
|
11
|
-
[*.ts]
|
|
12
|
-
quote_type = single
|
|
13
|
-
ij_typescript_use_double_quotes = false
|
|
14
|
-
|
|
15
|
-
[*.md]
|
|
16
|
-
max_line_length = off
|
|
17
|
-
trim_trailing_whitespace = false
|
package/.vscode/extensions.json
DELETED
package/.vscode/launch.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
3
|
-
"version": "0.2.0",
|
|
4
|
-
"configurations": [
|
|
5
|
-
{
|
|
6
|
-
"name": "ng serve",
|
|
7
|
-
"type": "chrome",
|
|
8
|
-
"request": "launch",
|
|
9
|
-
"preLaunchTask": "npm: start",
|
|
10
|
-
"url": "http://localhost:4200/"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "ng test",
|
|
14
|
-
"type": "chrome",
|
|
15
|
-
"request": "launch",
|
|
16
|
-
"preLaunchTask": "npm: test",
|
|
17
|
-
"url": "http://localhost:9876/debug.html"
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
package/.vscode/tasks.json
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
-
"version": "2.0.0",
|
|
4
|
-
"tasks": [
|
|
5
|
-
{
|
|
6
|
-
"type": "npm",
|
|
7
|
-
"script": "start",
|
|
8
|
-
"isBackground": true,
|
|
9
|
-
"problemMatcher": {
|
|
10
|
-
"owner": "typescript",
|
|
11
|
-
"pattern": "$tsc",
|
|
12
|
-
"background": {
|
|
13
|
-
"activeOnStart": true,
|
|
14
|
-
"beginsPattern": {
|
|
15
|
-
"regexp": "(.*?)"
|
|
16
|
-
},
|
|
17
|
-
"endsPattern": {
|
|
18
|
-
"regexp": "bundle generation complete"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "npm",
|
|
25
|
-
"script": "test",
|
|
26
|
-
"isBackground": true,
|
|
27
|
-
"problemMatcher": {
|
|
28
|
-
"owner": "typescript",
|
|
29
|
-
"pattern": "$tsc",
|
|
30
|
-
"background": {
|
|
31
|
-
"activeOnStart": true,
|
|
32
|
-
"beginsPattern": {
|
|
33
|
-
"regexp": "(.*?)"
|
|
34
|
-
},
|
|
35
|
-
"endsPattern": {
|
|
36
|
-
"regexp": "bundle generation complete"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
}
|
package/angular.json
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
-
"version": 1,
|
|
4
|
-
"newProjectRoot": "projects",
|
|
5
|
-
"projects": {
|
|
6
|
-
"honey-core": {
|
|
7
|
-
"projectType": "library",
|
|
8
|
-
"root": "projects/honey-core",
|
|
9
|
-
"sourceRoot": "projects/honey-core/src",
|
|
10
|
-
"prefix": "lib",
|
|
11
|
-
"architect": {
|
|
12
|
-
"build": {
|
|
13
|
-
"builder": "@angular-devkit/build-angular:ng-packagr",
|
|
14
|
-
"options": {
|
|
15
|
-
"project": "projects/honey-core/ng-package.json"
|
|
16
|
-
},
|
|
17
|
-
"configurations": {
|
|
18
|
-
"production": {
|
|
19
|
-
"tsConfig": "projects/honey-core/tsconfig.lib.prod.json"
|
|
20
|
-
},
|
|
21
|
-
"development": {
|
|
22
|
-
"tsConfig": "projects/honey-core/tsconfig.lib.json"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"defaultConfiguration": "production"
|
|
26
|
-
},
|
|
27
|
-
"test": {
|
|
28
|
-
"builder": "@angular-devkit/build-angular:karma",
|
|
29
|
-
"options": {
|
|
30
|
-
"tsConfig": "projects/honey-core/tsconfig.spec.json",
|
|
31
|
-
"polyfills": [
|
|
32
|
-
"zone.js",
|
|
33
|
-
"zone.js/testing"
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"storybook": {
|
|
38
|
-
"builder": "@storybook/angular:start-storybook",
|
|
39
|
-
"options": {
|
|
40
|
-
"configDir": "projects/honey-core/.storybook",
|
|
41
|
-
"browserTarget": "honey-core:build",
|
|
42
|
-
"compodoc": false,
|
|
43
|
-
"port": 6006,
|
|
44
|
-
"styles": [
|
|
45
|
-
"projects/honey-core/src/styles/variables.scss"
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"build-storybook": {
|
|
50
|
-
"builder": "@storybook/angular:build-storybook",
|
|
51
|
-
"options": {
|
|
52
|
-
"configDir": "projects/honey-core/.storybook",
|
|
53
|
-
"browserTarget": "honey-core:build",
|
|
54
|
-
"compodoc": false,
|
|
55
|
-
"outputDir": "storybook-static"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { StorybookConfig } from '@storybook/angular';
|
|
2
|
-
|
|
3
|
-
const config: StorybookConfig = {
|
|
4
|
-
"stories": [
|
|
5
|
-
"../src/**/*.mdx",
|
|
6
|
-
"../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"
|
|
7
|
-
],
|
|
8
|
-
"addons": [
|
|
9
|
-
"@storybook/addon-essentials",
|
|
10
|
-
"@storybook/addon-onboarding",
|
|
11
|
-
"@storybook/addon-interactions"
|
|
12
|
-
],
|
|
13
|
-
"framework": {
|
|
14
|
-
"name": "@storybook/angular",
|
|
15
|
-
"options": {}
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export default config;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig.lib.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"types": ["node"],
|
|
5
|
-
"allowSyntheticDefaultImports": true,
|
|
6
|
-
"resolveJsonModule": true
|
|
7
|
-
},
|
|
8
|
-
"exclude": ["../src/test.ts", "../src/**/*.spec.ts"],
|
|
9
|
-
"include": ["../src/**/*.stories.*", "./preview.ts"],
|
|
10
|
-
"files": ["./typings.d.ts"]
|
|
11
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# HoneyCore
|
|
2
|
-
|
|
3
|
-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ng generate component component-name
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
ng generate --help
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Building
|
|
20
|
-
|
|
21
|
-
To build the library, run:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
ng build honey-core
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
-
|
|
29
|
-
### Publishing the Library
|
|
30
|
-
|
|
31
|
-
Once the project is built, you can publish your library by following these steps:
|
|
32
|
-
|
|
33
|
-
1. Navigate to the `dist` directory:
|
|
34
|
-
```bash
|
|
35
|
-
cd dist/honey-core
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
-
```bash
|
|
40
|
-
npm publish
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Running unit tests
|
|
44
|
-
|
|
45
|
-
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
ng test
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Running end-to-end tests
|
|
52
|
-
|
|
53
|
-
For end-to-end (e2e) testing, run:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
ng e2e
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
60
|
-
|
|
61
|
-
## Additional Resources
|
|
62
|
-
|
|
63
|
-
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
.hc-button {
|
|
2
|
-
display : inline-block;
|
|
3
|
-
cursor : pointer;
|
|
4
|
-
border : 0;
|
|
5
|
-
border-radius : 4px;
|
|
6
|
-
font-weight : 700;
|
|
7
|
-
line-height : 1;
|
|
8
|
-
font-family : 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
&:disabled {
|
|
12
|
-
cursor : not-allowed;
|
|
13
|
-
background : var(--hc-disabled-bg);
|
|
14
|
-
color : var(--hc-disabled-text);
|
|
15
|
-
|
|
16
|
-
&:hover {
|
|
17
|
-
background : var(--hc-disabled-bg);
|
|
18
|
-
color : var(--hc-disabled-text);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.hc-primary {
|
|
24
|
-
background-color : var(--hc-background-primary);
|
|
25
|
-
color : white;
|
|
26
|
-
|
|
27
|
-
&:hover {
|
|
28
|
-
background-color : var(--hc-background-primary-hover);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.hc-secondary {
|
|
33
|
-
background-color : var(--hc-secondary-500);
|
|
34
|
-
color : white;
|
|
35
|
-
}
|
|
36
|
-
.hc-small {
|
|
37
|
-
padding : 10px 16px;
|
|
38
|
-
font-size : 12px;
|
|
39
|
-
}
|
|
40
|
-
.hc-medium {
|
|
41
|
-
padding : 10px 20px;
|
|
42
|
-
font-size : 14px;
|
|
43
|
-
}
|
|
44
|
-
.hc-large {
|
|
45
|
-
padding : 12px 24px;
|
|
46
|
-
font-size : 16px;
|
|
47
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { HcButtonComponent } from './button.component';
|
|
4
|
-
|
|
5
|
-
describe('HcButtonComponent', () => {
|
|
6
|
-
let component: HcButtonComponent;
|
|
7
|
-
let fixture: ComponentFixture<HcButtonComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [HcButtonComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(HcButtonComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|