kz-au-md-input 1.0.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,7 @@
1
+ # au-md-input
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test au-md-input` to execute the unit tests.
@@ -0,0 +1,61 @@
1
+ import * as i0 from '@angular/core';
2
+ import { HostListener, Directive, HostBinding, ContentChild, Input, Component } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+
5
+ class InputRefDirective {
6
+ focus = false;
7
+ onFocus() {
8
+ this.focus = true;
9
+ }
10
+ onBlur() {
11
+ this.focus = false;
12
+ }
13
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputRefDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
14
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: InputRefDirective, isStandalone: true, selector: "input[auInputMDRef]", host: { listeners: { "focus": "onFocus()", "blur": "onBlur()" } }, ngImport: i0 });
15
+ }
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InputRefDirective, decorators: [{
17
+ type: Directive,
18
+ args: [{
19
+ selector: 'input[auInputMDRef]',
20
+ }]
21
+ }], propDecorators: { onFocus: [{
22
+ type: HostListener,
23
+ args: ['focus']
24
+ }], onBlur: [{
25
+ type: HostListener,
26
+ args: ['blur']
27
+ }] } });
28
+
29
+ class AuMdInput {
30
+ icon = '';
31
+ input = null;
32
+ ngAfterContentInit() {
33
+ if (!this.input) {
34
+ console.error("the au-md-input needs an input inside its content");
35
+ }
36
+ }
37
+ get isInputFocus() {
38
+ return this.input ? this.input.focus : false;
39
+ }
40
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AuMdInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
41
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: AuMdInput, isStandalone: true, selector: "lib-au-md-input", inputs: { icon: "icon" }, host: { properties: { "class.input-focus": "this.isInputFocus" } }, queries: [{ propertyName: "input", first: true, predicate: InputRefDirective, descendants: true }], ngImport: i0, template: "<i class=\"md-icon\" [innerHtml]=\"icon\"></i>\n<ng-content></ng-content>", styles: [".icon{width:20px;text-align:center;padding-left:5px;padding-right:2px;border:none;vertical-align:middle}:host{border-width:1px;border-style:solid;padding:1px 0;display:inline-block}:host(.input-focus){outline:none;border:1px solid #4D90FE;-webkit-box-shadow:0px 0px 5px #4D90FE;box-shadow:0 0 5px #4d90fe}:host ::ng-deep input{border:none;outline:none;height:100%;margin:1px 0;box-sizing:border-box}:host{background:#fff;border-color:#d3d3d3}:host(.input-focus){border-color:#4d90fe;-webkit-box-shadow:0px 0px 5px #4D90FE;box-shadow:0 0 5px #4d90fe}.md-icon{line-height:24px;vertical-align:middle}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AuMdInput, decorators: [{
44
+ type: Component,
45
+ args: [{ selector: 'lib-au-md-input', imports: [CommonModule], template: "<i class=\"md-icon\" [innerHtml]=\"icon\"></i>\n<ng-content></ng-content>", styles: [".icon{width:20px;text-align:center;padding-left:5px;padding-right:2px;border:none;vertical-align:middle}:host{border-width:1px;border-style:solid;padding:1px 0;display:inline-block}:host(.input-focus){outline:none;border:1px solid #4D90FE;-webkit-box-shadow:0px 0px 5px #4D90FE;box-shadow:0 0 5px #4d90fe}:host ::ng-deep input{border:none;outline:none;height:100%;margin:1px 0;box-sizing:border-box}:host{background:#fff;border-color:#d3d3d3}:host(.input-focus){border-color:#4d90fe;-webkit-box-shadow:0px 0px 5px #4D90FE;box-shadow:0 0 5px #4d90fe}.md-icon{line-height:24px;vertical-align:middle}\n"] }]
46
+ }], propDecorators: { icon: [{
47
+ type: Input
48
+ }], input: [{
49
+ type: ContentChild,
50
+ args: [InputRefDirective]
51
+ }], isInputFocus: [{
52
+ type: HostBinding,
53
+ args: ['class.input-focus']
54
+ }] } });
55
+
56
+ /**
57
+ * Generated bundle index. Do not edit.
58
+ */
59
+
60
+ export { AuMdInput, InputRefDirective };
61
+ //# sourceMappingURL=kz-au-md-input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kz-au-md-input.mjs","sources":["../../../../libs/au-md-input/src/lib/common/input-ref.ts","../../../../libs/au-md-input/src/lib/au-md-input/au-md-input.ts","../../../../libs/au-md-input/src/lib/au-md-input/au-md-input.html","../../../../libs/au-md-input/src/kz-au-md-input.ts"],"sourcesContent":["import { Directive, HostListener } from '@angular/core';\n\n@Directive({\n selector: 'input[auInputMDRef]',\n})\nexport class InputRefDirective {\n focus = false;\n\n @HostListener('focus')\n onFocus() {\n this.focus = true;\n }\n\n @HostListener('blur')\n onBlur() {\n this.focus = false;\n }\n}\n","import { AfterContentInit, Component, ContentChild, HostBinding, Input } from '@angular/core';\n\nimport { CommonModule } from '@angular/common';\nimport { InputRefDirective } from './../common/input-ref';\n\n@Component({\n selector: 'lib-au-md-input',\n imports: [CommonModule],\n templateUrl: './au-md-input.html',\n styleUrl: './au-md-input.scss',\n})\nexport class AuMdInput implements AfterContentInit {\n\n @Input()\n icon = '';\n\n @ContentChild(InputRefDirective)\n input: InputRefDirective | null = null;\n\n ngAfterContentInit() {\n if (!this.input) {\n console.error(\"the au-md-input needs an input inside its content\");\n }\n }\n\n @HostBinding('class.input-focus')\n get isInputFocus() {\n return this.input ? this.input.focus : false;\n }\n}\n","<i class=\"md-icon\" [innerHtml]=\"icon\"></i>\n<ng-content></ng-content>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAKa,iBAAiB,CAAA;IAC5B,KAAK,GAAG,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,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,mBAAA,EAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,OAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAKN,iBAAiB,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChBjC,2EACyB,gpBDMb,YAAY,EAAA,CAAA,EAAA,CAAA;;2FAIX,SAAS,EAAA,UAAA,EAAA,CAAA;kBANrB,SAAS;+BACE,iBAAiB,EAAA,OAAA,EAClB,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,2EAAA,EAAA,MAAA,EAAA,CAAA,ylBAAA,CAAA,EAAA;;sBAMtB;;sBAGA,YAAY;uBAAC,iBAAiB;;sBAS9B,WAAW;uBAAC,mBAAmB;;;AEzBlC;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "kz-au-md-input",
3
+ "version": "1.0.0",
4
+ "peerDependencies": {
5
+ "@angular/common": "^21.0.0",
6
+ "@angular/core": "^21.0.0",
7
+ "vite": "^7.0.0",
8
+ "@analogjs/vite-plugin-angular": "~2.1.2",
9
+ "@nx/vite": "22.3.3"
10
+ },
11
+ "sideEffects": false,
12
+ "module": "fesm2022/kz-au-md-input.mjs",
13
+ "typings": "types/kz-au-md-input.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/kz-au-md-input.d.ts",
20
+ "default": "./fesm2022/kz-au-md-input.mjs"
21
+ }
22
+ },
23
+ "dependencies": {
24
+ "tslib": "^2.3.0"
25
+ }
26
+ }
@@ -0,0 +1,21 @@
1
+ import * as i0 from '@angular/core';
2
+ import { AfterContentInit } from '@angular/core';
3
+
4
+ declare class InputRefDirective {
5
+ focus: boolean;
6
+ onFocus(): void;
7
+ onBlur(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputRefDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<InputRefDirective, "input[auInputMDRef]", never, {}, {}, never, never, true, never>;
10
+ }
11
+
12
+ declare class AuMdInput implements AfterContentInit {
13
+ icon: string;
14
+ input: InputRefDirective | null;
15
+ ngAfterContentInit(): void;
16
+ get isInputFocus(): boolean;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuMdInput, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<AuMdInput, "lib-au-md-input", never, { "icon": { "alias": "icon"; "required": false; }; }, {}, ["input"], ["*"], true, never>;
19
+ }
20
+
21
+ export { AuMdInput, InputRefDirective };