@forgeroute/ui 0.0.0-stage → 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/fesm2022/forgeroute-ui.mjs +162 -0
- package/fesm2022/forgeroute-ui.mjs.map +1 -0
- package/package.json +37 -3
- package/types/forgeroute-ui.d.ts +30 -0
- package/README.md +0 -3
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/forms";
|
|
4
|
+
import { FormsModule } from "@angular/forms";
|
|
5
|
+
var SearchInputComponent = class SearchInputComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.placeholder = "Search...";
|
|
8
|
+
this.ariaLabel = "";
|
|
9
|
+
this.value = "";
|
|
10
|
+
this.maxlength = 200;
|
|
11
|
+
this.valueChange = new EventEmitter();
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
15
|
+
minVersion: "12.0.0",
|
|
16
|
+
version: "22.2.2",
|
|
17
|
+
ngImport: i0,
|
|
18
|
+
type: SearchInputComponent,
|
|
19
|
+
deps: [],
|
|
20
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
static {
|
|
24
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
25
|
+
minVersion: "14.0.0",
|
|
26
|
+
version: "22.2.2",
|
|
27
|
+
type: SearchInputComponent,
|
|
28
|
+
isStandalone: true,
|
|
29
|
+
selector: "ui-search-input",
|
|
30
|
+
inputs: {
|
|
31
|
+
placeholder: "placeholder",
|
|
32
|
+
ariaLabel: "ariaLabel",
|
|
33
|
+
value: "value",
|
|
34
|
+
maxlength: "maxlength"
|
|
35
|
+
},
|
|
36
|
+
outputs: { valueChange: "valueChange" },
|
|
37
|
+
ngImport: i0,
|
|
38
|
+
template: `
|
|
39
|
+
<div class="search-bar" role="search">
|
|
40
|
+
<svg
|
|
41
|
+
class="search-icon"
|
|
42
|
+
aria-hidden="true"
|
|
43
|
+
width="16"
|
|
44
|
+
height="16"
|
|
45
|
+
viewBox="0 0 24 24"
|
|
46
|
+
fill="none"
|
|
47
|
+
stroke="currentColor"
|
|
48
|
+
stroke-width="2"
|
|
49
|
+
stroke-linecap="round"
|
|
50
|
+
stroke-linejoin="round">
|
|
51
|
+
<circle cx="11" cy="11" r="8"/>
|
|
52
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
|
53
|
+
</svg>
|
|
54
|
+
<input
|
|
55
|
+
class="search-input"
|
|
56
|
+
type="search"
|
|
57
|
+
[placeholder]="placeholder"
|
|
58
|
+
[attr.aria-label]="ariaLabel || placeholder"
|
|
59
|
+
[(ngModel)]="value"
|
|
60
|
+
(ngModelChange)="valueChange.emit($event)"
|
|
61
|
+
autocomplete="off"
|
|
62
|
+
inputmode="search"
|
|
63
|
+
[maxlength]="maxlength"
|
|
64
|
+
data-testid="search-input" />
|
|
65
|
+
</div>
|
|
66
|
+
`,
|
|
67
|
+
isInline: true,
|
|
68
|
+
styles: [":host{display:block}.search-bar{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:10px;color:#94a3b8;pointer-events:none}.search-input{width:100%;padding:8px 10px 8px 34px;border:1px solid #e2e8f0;border-radius:6px;font-size:.875rem;background:#fff;color:#1e293b;outline:none;min-width:380px;font-family:inherit;transition:border-color .15s}.search-input:focus{border-color:#1e293b;box-shadow:0 0 0 3px #1e293b14}.search-input::placeholder{color:#94a3b8}@media(max-width:768px){.search-input{min-width:180px}}@media(max-width:480px){.search-input{min-width:0;width:100%;font-size:16px}}\n"],
|
|
69
|
+
dependencies: [
|
|
70
|
+
{
|
|
71
|
+
kind: "ngmodule",
|
|
72
|
+
type: FormsModule
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: "directive",
|
|
76
|
+
type: i1.DefaultValueAccessor,
|
|
77
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
kind: "directive",
|
|
81
|
+
type: i1.NgControlStatus,
|
|
82
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
kind: "directive",
|
|
86
|
+
type: i1.MaxLengthValidator,
|
|
87
|
+
selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",
|
|
88
|
+
inputs: ["maxlength"]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
kind: "directive",
|
|
92
|
+
type: i1.NgModel,
|
|
93
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
94
|
+
inputs: [
|
|
95
|
+
"name",
|
|
96
|
+
"disabled",
|
|
97
|
+
"ngModel",
|
|
98
|
+
"ngModelOptions"
|
|
99
|
+
],
|
|
100
|
+
outputs: ["ngModelChange"],
|
|
101
|
+
exportAs: ["ngModel"]
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
109
|
+
minVersion: "12.0.0",
|
|
110
|
+
version: "22.2.2",
|
|
111
|
+
ngImport: i0,
|
|
112
|
+
type: SearchInputComponent,
|
|
113
|
+
decorators: [{
|
|
114
|
+
type: Component,
|
|
115
|
+
args: [{
|
|
116
|
+
selector: "ui-search-input",
|
|
117
|
+
standalone: true,
|
|
118
|
+
imports: [FormsModule],
|
|
119
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
120
|
+
template: `
|
|
121
|
+
<div class="search-bar" role="search">
|
|
122
|
+
<svg
|
|
123
|
+
class="search-icon"
|
|
124
|
+
aria-hidden="true"
|
|
125
|
+
width="16"
|
|
126
|
+
height="16"
|
|
127
|
+
viewBox="0 0 24 24"
|
|
128
|
+
fill="none"
|
|
129
|
+
stroke="currentColor"
|
|
130
|
+
stroke-width="2"
|
|
131
|
+
stroke-linecap="round"
|
|
132
|
+
stroke-linejoin="round">
|
|
133
|
+
<circle cx="11" cy="11" r="8"/>
|
|
134
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
|
135
|
+
</svg>
|
|
136
|
+
<input
|
|
137
|
+
class="search-input"
|
|
138
|
+
type="search"
|
|
139
|
+
[placeholder]="placeholder"
|
|
140
|
+
[attr.aria-label]="ariaLabel || placeholder"
|
|
141
|
+
[(ngModel)]="value"
|
|
142
|
+
(ngModelChange)="valueChange.emit($event)"
|
|
143
|
+
autocomplete="off"
|
|
144
|
+
inputmode="search"
|
|
145
|
+
[maxlength]="maxlength"
|
|
146
|
+
data-testid="search-input" />
|
|
147
|
+
</div>
|
|
148
|
+
`,
|
|
149
|
+
styles: [":host{display:block}.search-bar{position:relative;display:flex;align-items:center}.search-icon{position:absolute;left:10px;color:#94a3b8;pointer-events:none}.search-input{width:100%;padding:8px 10px 8px 34px;border:1px solid #e2e8f0;border-radius:6px;font-size:.875rem;background:#fff;color:#1e293b;outline:none;min-width:380px;font-family:inherit;transition:border-color .15s}.search-input:focus{border-color:#1e293b;box-shadow:0 0 0 3px #1e293b14}.search-input::placeholder{color:#94a3b8}@media(max-width:768px){.search-input{min-width:180px}}@media(max-width:480px){.search-input{min-width:0;width:100%;font-size:16px}}\n"]
|
|
150
|
+
}]
|
|
151
|
+
}],
|
|
152
|
+
propDecorators: {
|
|
153
|
+
placeholder: [{ type: Input }],
|
|
154
|
+
ariaLabel: [{ type: Input }],
|
|
155
|
+
value: [{ type: Input }],
|
|
156
|
+
maxlength: [{ type: Input }],
|
|
157
|
+
valueChange: [{ type: Output }]
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
export { SearchInputComponent };
|
|
161
|
+
|
|
162
|
+
//# sourceMappingURL=forgeroute-ui.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgeroute-ui.mjs","names":[],"sources":["../../../projects/forgeroute-ui/src/lib/search-input/search-input.component.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\n\n@Component({\n selector: 'ui-search-input',\n standalone: true,\n imports: [FormsModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"search-bar\" role=\"search\">\n <svg\n class=\"search-icon\"\n aria-hidden=\"true\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <circle cx=\"11\" cy=\"11\" r=\"8\"/>\n <line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"/>\n </svg>\n <input\n class=\"search-input\"\n type=\"search\"\n [placeholder]=\"placeholder\"\n [attr.aria-label]=\"ariaLabel || placeholder\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"valueChange.emit($event)\"\n autocomplete=\"off\"\n inputmode=\"search\"\n [maxlength]=\"maxlength\"\n data-testid=\"search-input\" />\n </div>\n `,\n styles: [`\n :host { display: block; }\n\n .search-bar {\n position: relative;\n display: flex;\n align-items: center;\n }\n\n .search-icon {\n position: absolute;\n left: 10px;\n color: #94a3b8;\n pointer-events: none;\n }\n\n .search-input {\n width: 100%;\n padding: 8px 10px 8px 34px;\n border: 1px solid #e2e8f0;\n border-radius: 6px;\n font-size: 0.875rem;\n background: #fff;\n color: #1e293b;\n outline: none;\n min-width: 380px;\n font-family: inherit;\n transition: border-color 0.15s;\n }\n\n .search-input:focus {\n border-color: #1e293b;\n box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.08);\n }\n\n .search-input::placeholder { color: #94a3b8; }\n\n @media (max-width: 768px) {\n .search-input { min-width: 180px; }\n }\n\n @media (max-width: 480px) {\n .search-input { min-width: 0; width: 100%; font-size: 16px; }\n }\n `],\n})\nexport class SearchInputComponent {\n @Input() placeholder = 'Search...';\n @Input() ariaLabel = '';\n @Input() value = '';\n @Input() maxlength = 200;\n @Output() valueChange = new EventEmitter<string>();\n}\n"],"mappings":";;;;AAmFA,IAAa,uBAAb,MAAa,qBAAoB;CAhFjC,cAAA;EAiFW,KAAA,cAAc;EACd,KAAA,YAAY;EACZ,KAAA,QAAQ;EACR,KAAA,YAAY;EACX,KAAA,cAAc,IAAI,aAAY;CACzC;CANY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAApB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAoB,cAAA;GAAA,UAAA;GAAA,QAAA;IAAA,aAAA;IAAA,WAAA;IAAA,OAAA;IAAA,WAAA;GAAA;GAAA,SAAA,EAAA,aAAA,cAAA;GAAA,UAAA;GAAA,UA3ErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BT,UAAA;GAAA,QAAA,CAAA,knBAAA;GAAA,cAAA;IAAA;KAAA,MAAA;KAAA,MA9BS;IAAW;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;KAAA,QAAA,CAAA,WAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,eAAA;KAAA,UAAA,CAAA,SAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AA6EV,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAhFhC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAiB,YACf;GAAI,SACP,CAAC,WAAW;GAAC,iBACL,wBAAwB;GAAM,UACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BT,QAAA,CAAA,knBAAA;EAAA,CAAA;;;EAgDA,aAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,WAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,OAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,WAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EACA,aAAA,CAAA,EAAA,MAAA,OAAA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgeroute/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": ">=22.0.0",
|
|
6
|
+
"@angular/core": ">=22.0.0",
|
|
7
|
+
"@angular/forms": ">=22.0.0"
|
|
8
|
+
},
|
|
9
|
+
"peerDependenciesMeta": {
|
|
10
|
+
"@angular/forms": {
|
|
11
|
+
"optional": false
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"angular",
|
|
19
|
+
"ui",
|
|
20
|
+
"components",
|
|
21
|
+
"forgeroute"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"module": "fesm2022/forgeroute-ui.mjs",
|
|
25
|
+
"typings": "types/forgeroute-ui.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
"./package.json": {
|
|
28
|
+
"default": "./package.json"
|
|
29
|
+
},
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./types/forgeroute-ui.d.ts",
|
|
32
|
+
"default": "./fesm2022/forgeroute-ui.mjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"sideEffects": false,
|
|
36
|
+
"type": "module",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"tslib": "^2.3.0"
|
|
39
|
+
}
|
|
6
40
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { EventEmitter } from "@angular/core";
|
|
3
|
+
export declare class SearchInputComponent {
|
|
4
|
+
placeholder: string;
|
|
5
|
+
ariaLabel: string;
|
|
6
|
+
value: string;
|
|
7
|
+
maxlength: number;
|
|
8
|
+
valueChange: EventEmitter<string>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SearchInputComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SearchInputComponent, "ui-search-input", never, {
|
|
11
|
+
"placeholder": {
|
|
12
|
+
"alias": "placeholder";
|
|
13
|
+
"required": false;
|
|
14
|
+
};
|
|
15
|
+
"ariaLabel": {
|
|
16
|
+
"alias": "ariaLabel";
|
|
17
|
+
"required": false;
|
|
18
|
+
};
|
|
19
|
+
"value": {
|
|
20
|
+
"alias": "value";
|
|
21
|
+
"required": false;
|
|
22
|
+
};
|
|
23
|
+
"maxlength": {
|
|
24
|
+
"alias": "maxlength";
|
|
25
|
+
"required": false;
|
|
26
|
+
};
|
|
27
|
+
}, {
|
|
28
|
+
"valueChange": "valueChange";
|
|
29
|
+
}, never, never, true, never>;
|
|
30
|
+
}
|
package/README.md
DELETED