@hmscodes/honey-core 1.0.13 → 1.0.14
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.
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Component, EventEmitter, Output, Input } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
3
5
|
|
|
4
6
|
class HoneyCoreService {
|
|
5
7
|
constructor() { }
|
|
@@ -72,6 +74,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
72
74
|
type: Output
|
|
73
75
|
}] } });
|
|
74
76
|
|
|
77
|
+
class InputFloatingLabelComponent {
|
|
78
|
+
id = 'hc-input';
|
|
79
|
+
label = 'Label';
|
|
80
|
+
type = 'text';
|
|
81
|
+
required = false;
|
|
82
|
+
control;
|
|
83
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: InputFloatingLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
84
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.7", type: InputFloatingLabelComponent, isStandalone: true, selector: "hc-input-floating-label", inputs: { id: "id", label: "label", type: "type", required: "required", control: "control" }, ngImport: i0, template: "<fieldset class=\"hc-input\">\n <input\n [id]=\"id\"\n [type]=\"type\"\n [attr.required]=\"required || null\"\n [formControl]=\"control\"\n placeholder=\" \"\n />\n <label [for]=\"id\">{{ label }}</label>\n</fieldset>\n", styles: [".hc-input{position:relative;border:none;padding:0;margin:1rem 0}.hc-input input{width:100%;padding:1.2rem .8rem .4rem;font-size:1rem;border:1px solid #ccc;border-radius:4px}.hc-input input:focus{outline:none;border-color:var(--hc-primary-500)}.hc-input input:focus+label,.hc-input input:not(:placeholder-shown)+label{transform:translateY(-1rem);font-size:.75rem;color:var(--hc-primary-500)}.hc-input label{position:absolute;left:.8rem;top:1rem;transition:all .2s ease;pointer-events:none;color:#666;background-color:#fff;padding:0 .2rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
85
|
+
}
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: InputFloatingLabelComponent, decorators: [{
|
|
87
|
+
type: Component,
|
|
88
|
+
args: [{ selector: 'hc-input-floating-label', imports: [ReactiveFormsModule], standalone: true, template: "<fieldset class=\"hc-input\">\n <input\n [id]=\"id\"\n [type]=\"type\"\n [attr.required]=\"required || null\"\n [formControl]=\"control\"\n placeholder=\" \"\n />\n <label [for]=\"id\">{{ label }}</label>\n</fieldset>\n", styles: [".hc-input{position:relative;border:none;padding:0;margin:1rem 0}.hc-input input{width:100%;padding:1.2rem .8rem .4rem;font-size:1rem;border:1px solid #ccc;border-radius:4px}.hc-input input:focus{outline:none;border-color:var(--hc-primary-500)}.hc-input input:focus+label,.hc-input input:not(:placeholder-shown)+label{transform:translateY(-1rem);font-size:.75rem;color:var(--hc-primary-500)}.hc-input label{position:absolute;left:.8rem;top:1rem;transition:all .2s ease;pointer-events:none;color:#666;background-color:#fff;padding:0 .2rem}\n"] }]
|
|
89
|
+
}], propDecorators: { id: [{
|
|
90
|
+
type: Input
|
|
91
|
+
}], label: [{
|
|
92
|
+
type: Input
|
|
93
|
+
}], type: [{
|
|
94
|
+
type: Input
|
|
95
|
+
}], required: [{
|
|
96
|
+
type: Input
|
|
97
|
+
}], control: [{
|
|
98
|
+
type: Input
|
|
99
|
+
}] } });
|
|
100
|
+
|
|
75
101
|
/*
|
|
76
102
|
* Public API Surface of honey-core
|
|
77
103
|
*/
|
|
@@ -80,5 +106,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImpor
|
|
|
80
106
|
* Generated bundle index. Do not edit.
|
|
81
107
|
*/
|
|
82
108
|
|
|
83
|
-
export { HcButtonComponent, HoneyCoreComponent, HoneyCoreService };
|
|
109
|
+
export { HcButtonComponent, HoneyCoreComponent, HoneyCoreService, InputFloatingLabelComponent };
|
|
84
110
|
//# sourceMappingURL=hmscodes-honey-core.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmscodes-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/hmscodes-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 /** Style of the button */\n @Input()\n style: 's-solid' | 's-hollow' | 's-plain' = 's-solid';\n\n /** What color to use for the button */\n @Input()\n color?: string = 'c-primary';\n\n /** Size of the button */\n @Input()\n size?: 'h-small' | 'w-stretch' | null = null;\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', `${this.size}`, `${this.style}`, `${this.color}`];\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
|
|
1
|
+
{"version":3,"file":"hmscodes-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/lib/components/input/input-floating-label.component.ts","../../../projects/honey-core/src/lib/components/input/input-floating-label.component.html","../../../projects/honey-core/src/public-api.ts","../../../projects/honey-core/src/hmscodes-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 /** Style of the button */\n @Input()\n style: 's-solid' | 's-hollow' | 's-plain' = 's-solid';\n\n /** What color to use for the button */\n @Input()\n color?: string = 'c-primary';\n\n /** Size of the button */\n @Input()\n size?: 'h-small' | 'w-stretch' | null = null;\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', `${this.size}`, `${this.style}`, `${this.color}`];\n }\n}\n","<button\n type=\"button\"\n [class]=\"classes\"\n [disabled]=\"disabled\"\n (click)=\"onClick.emit($event)\"\n>\n <ng-content />\n</button>","import { Component, Input } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\n\n@Component({\n selector: 'hc-input-floating-label',\n templateUrl: './input-floating-label.component.html',\n styleUrls: ['./input-floating-label.component.scss'],\n imports: [ReactiveFormsModule],\n standalone: true,\n})\nexport class InputFloatingLabelComponent {\n @Input() id: string = 'hc-input';\n @Input() label: string = 'Label';\n @Input() type: string = 'text';\n @Input() required = false;\n @Input() control!: FormControl;\n}\n\n","<fieldset class=\"hc-input\">\n <input\n [id]=\"id\"\n [type]=\"type\"\n [attr.required]=\"required || null\"\n [formControl]=\"control\"\n placeholder=\" \"\n />\n <label [for]=\"id\">{{ label }}</label>\n</fieldset>\n","/*\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';\nexport * from './lib/components/input/input-floating-label.component';\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,UAA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A,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAGlB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAPvC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yBAAyB,EAG1B,OAAA,EAAA,CAAC,mBAAmB,CAAC,cAClB,IAAI,EAAA,QAAA,EAAA,+OAAA,EAAA,MAAA,EAAA,CAAA,6hBAAA,CAAA,EAAA;8BAGP,EAAE,EAAA,CAAA;sBAAV;gBACQ,KAAK,EAAA,CAAA;sBAAb;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,OAAO,EAAA,CAAA;sBAAf;;;AEfH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormControl } from '@angular/forms';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class InputFloatingLabelComponent {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type: string;
|
|
7
|
+
required: boolean;
|
|
8
|
+
control: FormControl;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputFloatingLabelComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InputFloatingLabelComponent, "hc-input-floating-label", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "type": { "alias": "type"; "required": false; }; "required": { "alias": "required"; "required": false; }; "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED