@hmscodes/honey-core 1.0.8 → 1.0.11
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/.editorconfig +17 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/README.md +14 -18
- package/angular.json +61 -0
- package/package.json +43 -24
- package/projects/honey-core/.storybook/main.ts +18 -0
- package/projects/honey-core/.storybook/preview.ts +14 -0
- package/projects/honey-core/.storybook/tsconfig.json +11 -0
- package/projects/honey-core/.storybook/typings.d.ts +4 -0
- package/projects/honey-core/README.md +63 -0
- package/projects/honey-core/ng-package.json +8 -0
- package/projects/honey-core/package.json +20 -0
- package/projects/honey-core/src/lib/components/button/button.component.html +8 -0
- package/projects/honey-core/src/lib/components/button/button.component.scss +1 -0
- package/projects/honey-core/src/lib/components/button/button.component.spec.ts +23 -0
- package/projects/honey-core/src/lib/components/button/button.component.ts +44 -0
- package/projects/honey-core/src/lib/components/input/input-floating-label.component.html +10 -0
- package/projects/honey-core/src/lib/components/input/input-floating-label.component.scss +37 -0
- package/projects/honey-core/src/lib/components/input/input-floating-label.component.spec.ts +22 -0
- package/projects/honey-core/src/lib/components/input/input-floating-label.component.ts +18 -0
- package/projects/honey-core/src/lib/honey-core.component.spec.ts +23 -0
- package/projects/honey-core/src/lib/honey-core.component.ts +15 -0
- package/projects/honey-core/src/lib/honey-core.service.spec.ts +16 -0
- package/projects/honey-core/src/lib/honey-core.service.ts +9 -0
- package/{public-api.d.ts → projects/honey-core/src/public-api.ts} +5 -0
- package/projects/honey-core/src/stories/.eslintrc.json +5 -0
- package/projects/honey-core/src/stories/Colors.mdx +40 -0
- package/projects/honey-core/src/stories/Presentation.mdx +7 -0
- package/projects/honey-core/src/stories/button.component.stories.ts +73 -0
- package/projects/honey-core/src/stories/button.css +30 -0
- package/projects/honey-core/src/stories/input-floating-label.component.stories.ts +23 -0
- package/projects/honey-core/src/stories/user.ts +3 -0
- package/projects/honey-core/styles/hc-button.scss +174 -0
- package/{styles → projects/honey-core/styles}/variables.css +6 -3
- package/projects/honey-core/tsconfig.lib.json +15 -0
- package/projects/honey-core/tsconfig.lib.prod.json +11 -0
- package/projects/honey-core/tsconfig.spec.json +15 -0
- package/storybook-static/162.af7e70f4.iframe.bundle.js +1 -0
- package/storybook-static/171.273750ed.iframe.bundle.js +2 -0
- package/storybook-static/171.273750ed.iframe.bundle.js.LICENSE.txt +5 -0
- package/storybook-static/25.1b431c80.iframe.bundle.js +2 -0
- package/storybook-static/25.1b431c80.iframe.bundle.js.LICENSE.txt +9 -0
- package/storybook-static/26.b413342f.iframe.bundle.js +1 -0
- package/storybook-static/401.6c674938.iframe.bundle.js +425 -0
- package/storybook-static/401.6c674938.iframe.bundle.js.LICENSE.txt +45 -0
- package/storybook-static/401.6c674938.iframe.bundle.js.map +1 -0
- package/storybook-static/94.778d394e.iframe.bundle.js +95 -0
- package/storybook-static/94.778d394e.iframe.bundle.js.LICENSE.txt +29 -0
- package/storybook-static/94.778d394e.iframe.bundle.js.map +1 -0
- package/storybook-static/944.2ba51a2f.iframe.bundle.js +1 -0
- package/storybook-static/980.3eb7bc80.iframe.bundle.js +1 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +511 -0
- package/storybook-static/index.html +177 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/main.e467415e.iframe.bundle.js +1 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/runtime~main.96e15a9b.iframe.bundle.js +1 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +402 -0
- package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +242 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js +222 -0
- package/storybook-static/sb-addons/onboarding-9/manager-bundle.js +127 -0
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +1051 -0
- package/storybook-static/sb-manager/globals-runtime.js +41591 -0
- package/storybook-static/sb-manager/globals.js +48 -0
- package/storybook-static/sb-manager/runtime.js +12048 -0
- package/storybook-static/sb-preview/globals.js +33 -0
- package/storybook-static/sb-preview/runtime.js +7745 -0
- package/storybook-static/stories-Colors-mdx.9084a017.iframe.bundle.js +1 -0
- package/storybook-static/stories-Presentation-mdx.6d8bf034.iframe.bundle.js +1 -0
- package/storybook-static/stories-button-component-stories.80fddfa5.iframe.bundle.js +1 -0
- package/storybook-static/stories-input-floating-label-component-stories.aa8a8aee.iframe.bundle.js +1 -0
- package/tsconfig.json +32 -0
- package/fesm2022/hmscodes-honey-core.mjs +0 -84
- package/fesm2022/hmscodes-honey-core.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/components/button/button.component.d.ts +0 -25
- package/lib/honey-core.component.d.ts +0 -5
- package/lib/honey-core.service.d.ts +0 -6
package/.editorconfig
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
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
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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/README.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# HoneyCore
|
|
2
2
|
|
|
3
|
-
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.4.
|
|
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.
|
|
4
14
|
|
|
5
15
|
## Code scaffolding
|
|
6
16
|
|
|
@@ -18,27 +28,13 @@ ng generate --help
|
|
|
18
28
|
|
|
19
29
|
## Building
|
|
20
30
|
|
|
21
|
-
To build the
|
|
31
|
+
To build the project run:
|
|
22
32
|
|
|
23
33
|
```bash
|
|
24
|
-
ng build
|
|
34
|
+
ng build
|
|
25
35
|
```
|
|
26
36
|
|
|
27
|
-
This
|
|
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
|
-
```
|
|
37
|
+
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
|
|
42
38
|
|
|
43
39
|
## Running unit tests
|
|
44
40
|
|
package/angular.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
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/styles/variables.css"
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,29 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmscodes/honey-core",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
"default": "./package.json"
|
|
13
|
-
},
|
|
14
|
-
".": {
|
|
15
|
-
"types": "./index.d.ts",
|
|
16
|
-
"default": "./fesm2022/hmscodes-honey-core.mjs"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"peerDependencies": {
|
|
20
|
-
"@angular/common": "^19.2.0",
|
|
21
|
-
"@angular/core": "^19.2.0"
|
|
3
|
+
"version": "1.0.11",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"ng": "ng",
|
|
6
|
+
"start": "ng serve",
|
|
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"
|
|
22
12
|
},
|
|
13
|
+
"private": false,
|
|
23
14
|
"dependencies": {
|
|
24
|
-
"
|
|
15
|
+
"@angular/common": "^19.2.0",
|
|
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"
|
|
25
25
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@angular-devkit/build-angular": "^19.2.8",
|
|
28
|
+
"@angular/cli": "^19.2.4",
|
|
29
|
+
"@angular/compiler-cli": "^19.2.0",
|
|
30
|
+
"@storybook/addon-essentials": "^8.6.12",
|
|
31
|
+
"@storybook/addon-interactions": "^8.6.12",
|
|
32
|
+
"@storybook/addon-onboarding": "^8.6.12",
|
|
33
|
+
"@storybook/angular": "^8.6.12",
|
|
34
|
+
"@storybook/blocks": "^8.6.12",
|
|
35
|
+
"@storybook/test": "^8.6.12",
|
|
36
|
+
"@types/jasmine": "~5.1.0",
|
|
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"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hmscodes/honey-core",
|
|
3
|
+
"version": "1.0.10",
|
|
4
|
+
"exports": {
|
|
5
|
+
"./styles/variables.css": {
|
|
6
|
+
"default": "./styles/variables.css"
|
|
7
|
+
},
|
|
8
|
+
"./": {
|
|
9
|
+
"default": "./"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"peerDependencies": {
|
|
13
|
+
"@angular/common": "^19.2.0",
|
|
14
|
+
"@angular/core": "^19.2.0"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"tslib": "^2.3.0"
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": false
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use '../../../../styles/hc-button.scss' as *;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'hc-button',
|
|
5
|
+
templateUrl: './button.component.html',
|
|
6
|
+
styleUrl: './button.component.scss',
|
|
7
|
+
imports: [],
|
|
8
|
+
standalone: true,
|
|
9
|
+
})
|
|
10
|
+
export class HcButtonComponent {
|
|
11
|
+
/** Style of the button */
|
|
12
|
+
@Input()
|
|
13
|
+
style: 's-solid' | 's-hollow' | 's-plain' = 's-solid';
|
|
14
|
+
|
|
15
|
+
/** What color to use for the button */
|
|
16
|
+
@Input()
|
|
17
|
+
color?: string = 'c-primary';
|
|
18
|
+
|
|
19
|
+
/** Size of the button */
|
|
20
|
+
@Input()
|
|
21
|
+
size?: 'h-small' | 'w-stretch' | null = null;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Button contents
|
|
25
|
+
*
|
|
26
|
+
* @required
|
|
27
|
+
*/
|
|
28
|
+
@Input()
|
|
29
|
+
label = 'Button';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Disabled state of the button
|
|
33
|
+
*/
|
|
34
|
+
@Input()
|
|
35
|
+
disabled = false;
|
|
36
|
+
|
|
37
|
+
/** Optional click handler */
|
|
38
|
+
@Output()
|
|
39
|
+
onClick = new EventEmitter<Event>();
|
|
40
|
+
|
|
41
|
+
public get classes(): string[] {
|
|
42
|
+
return ['hc-button', `${this.size}`, `${this.style}`, `${this.color}`];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.hc-input {
|
|
2
|
+
position: relative;
|
|
3
|
+
border: none;
|
|
4
|
+
padding: 0;
|
|
5
|
+
margin: 1rem 0;
|
|
6
|
+
|
|
7
|
+
input {
|
|
8
|
+
width: 100%;
|
|
9
|
+
padding: 1.2rem 0.8rem 0.4rem;
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
border: 1px solid #ccc;
|
|
12
|
+
border-radius: 4px;
|
|
13
|
+
|
|
14
|
+
&:focus {
|
|
15
|
+
outline: none;
|
|
16
|
+
border-color: var(--hc-primary-500);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:focus + label,
|
|
20
|
+
&:not(:placeholder-shown) + label {
|
|
21
|
+
transform: translateY(-1rem);
|
|
22
|
+
font-size: 0.75rem;
|
|
23
|
+
color: var(--hc-primary-500);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
label {
|
|
28
|
+
position: absolute;
|
|
29
|
+
left: 0.8rem;
|
|
30
|
+
top: 1rem;
|
|
31
|
+
transition: all 0.2s ease;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
color: #666;
|
|
34
|
+
background-color: white;
|
|
35
|
+
padding: 0 0.2rem;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { InputFloatingLabelComponent } from './input-floating-label.component';
|
|
3
|
+
|
|
4
|
+
describe('InputFloatingLabelComponent', () => {
|
|
5
|
+
let component: InputFloatingLabelComponent;
|
|
6
|
+
let fixture: ComponentFixture<InputFloatingLabelComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [InputFloatingLabelComponent]
|
|
11
|
+
})
|
|
12
|
+
.compileComponents();
|
|
13
|
+
|
|
14
|
+
fixture = TestBed.createComponent(InputFloatingLabelComponent);
|
|
15
|
+
component = fixture.componentInstance;
|
|
16
|
+
fixture.detectChanges();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('should create', () => {
|
|
20
|
+
expect(component).toBeTruthy();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'hc-input-floating-label',
|
|
6
|
+
templateUrl: './input-floating-label.component.html',
|
|
7
|
+
styleUrls: ['./input-floating-label.component.scss'],
|
|
8
|
+
imports: [ReactiveFormsModule],
|
|
9
|
+
standalone: true,
|
|
10
|
+
})
|
|
11
|
+
export class InputFloatingLabelComponent {
|
|
12
|
+
@Input() id: string = 'hc-input';
|
|
13
|
+
@Input() label: string = 'Label';
|
|
14
|
+
@Input() type: string = 'text';
|
|
15
|
+
@Input() required = false;
|
|
16
|
+
@Input() control!: FormControl;
|
|
17
|
+
}
|
|
18
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { HoneyCoreComponent } from './honey-core.component';
|
|
4
|
+
|
|
5
|
+
describe('HoneyCoreComponent', () => {
|
|
6
|
+
let component: HoneyCoreComponent;
|
|
7
|
+
let fixture: ComponentFixture<HoneyCoreComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [HoneyCoreComponent]
|
|
12
|
+
})
|
|
13
|
+
.compileComponents();
|
|
14
|
+
|
|
15
|
+
fixture = TestBed.createComponent(HoneyCoreComponent);
|
|
16
|
+
component = fixture.componentInstance;
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('should create', () => {
|
|
21
|
+
expect(component).toBeTruthy();
|
|
22
|
+
});
|
|
23
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { HoneyCoreService } from './honey-core.service';
|
|
4
|
+
|
|
5
|
+
describe('HoneyCoreService', () => {
|
|
6
|
+
let service: HoneyCoreService;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
TestBed.configureTestingModule({});
|
|
10
|
+
service = TestBed.inject(HoneyCoreService);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should be created', () => {
|
|
14
|
+
expect(service).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
});
|